Genkit is an open-source framework by Google for building and deploying AI-powered applications, available with JavaScript/TypeScript, Go, and Python SDKs. The `genkit-cli` package provides the command-line interface for interacting with the Genkit framework, facilitating development tasks such as project initialization, running local development servers, deploying flows, and inspecting traces. The current stable version of the JavaScript/TypeScript CLI is 1.32.0, with minor updates and release candidates released frequently, indicating active development. Key differentiators include its multi-language SDK support, integration with Google's AI services (like Vertex AI and Google GenAI), and a local development UI for visualizing AI application flows and traces.
npm install genkit-cliNo compatibility data collected yet for this library.
This quickstart demonstrates how to install the Genkit CLI, initialize a new Genkit project, configure it with the Google AI plugin, define a simple AI flow, and then run it using the local development UI. It includes setting up environment variables for API keys and assumes a basic TypeScript project setup.
Review the `@genkit-ai/google-genai` plugin documentation for current model availability and migrate to recommended or alternative models.
Upgrade your Node.js environment to version 20 or higher (e.g., using `nvm install 20` and `nvm use 20`).
If `curl -sL cli.genkit.dev | bash` fails, manually download the correct binary for your architecture from the Genkit GitHub releases or use `npm install -g genkit-cli` directly.
Consult the Genkit documentation for the new middleware package and adapt any custom middleware implementations to align with the updated patterns.
Run `npm install -g genkit-cli` to install the CLI globally. If the issue persists, ensure your shell's PATH includes the directory where npm installs global packages.
Stop the conflicting process, or specify a different port for the Genkit UI using the `--port` or `-p` option, e.g., `genkit start --port 4001 -- npx tsx src/index.ts`.
Obtain an API key from your model provider (e.g., Google AI Studio for Gemini). Set it as an environment variable before running Genkit, for example: `export GOOGLE_API_KEY='YOUR_API_KEY'`.
Ensure your `package.json` has `"type": "module"` and your `tsconfig.json` targets `ES2020` or higher with `"module": "NodeNext"` or `"ESNext"`. Use `npx tsx` for direct execution of TypeScript files in development, or compile to ESM and run.
No dependency data recorded yet.