Skip to content

feat(genkit-tools/cli): MVP init:ai-tools command for Genkit integration with AI tools #3388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ssbushi
Copy link
Contributor

@ssbushi ssbushi commented Aug 8, 2025

Adds scaffolding and gemini, claude support.

TODOs:

  • Support other tools (cursor)
  • non-interactive mode
  • Option to do a file-import based install for Gemini CLI

Checklist (if applicable):

@github-actions github-actions bot added docs Improvements or additions to documentation js tooling config labels Aug 8, 2025
@ssbushi ssbushi marked this pull request as ready for review August 8, 2025 16:56
Comment on lines +12 to +45

1. **Initialize Project**

```bash
mkdir my-genkit-app && cd my-genkit-app
npm init -y
npm install -D typescript tsx @types/node
```

2. **Install Dependencies**

```bash
npm install genkit @genkit-ai/googleai data-urls node-fetch
```

3. **Install Genkit CLI**

```bash
npm install -g genkit-cli
```

4. **Configure Genkit**

All code should be in a single `src/index.ts` file.

```ts
// src/index.ts
import { genkit, z } from 'genkit';
import { googleAI } from '@genkit-ai/googleai';

export const ai = genkit({
plugins: [googleAI()],
});
```
Copy link
Contributor Author

@ssbushi ssbushi Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the package names, do we need to go into details on how to install and init a project with Genkit in this file?

Comment on lines +358 to +383
## Running and Inspecting Flows

1. **Add Build Script**: Add the following to `package.json`:

```json
{
"scripts": {
"build": "tsc"
}
}
```

2. **Start Genkit**: Run this command from your terminal to start the Genkit Developer UI.

```bash
genkit start
```

Then, in a separate terminal, run the build command in watch mode:

```bash
npm run build -- --watch
```

Visit [http://localhost:4000](http://localhost:4000) to inspect and run your flows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question: This can be project specific and we should probably omit this info, and just specify the genkit start command and the Dev UI.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can try removing it but i had various issues. everything in the file was added through trial and error. though i dont recall which things fixed what.

* limitations under the License.
*/

export const GENKIT_DOCS = `# Genkit Node.js Cheatsheet (updated July 2025)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the same thing as GENKIT.md?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this const seems unused, delete?

.description(
'initialize AI tools in a workspace with helpful context related to the Genkit framework'
)
.option('-y', '--yes', 'Run in non-interactive mode (experimental)')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this flag experimental? I think the whole command should be experimental to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config docs Improvements or additions to documentation js tooling
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants