The Genkit CLI provides powerful commands for developing, testing, and managing your AI applications. It includes tools for running flows, evaluating models, and launching the Developer UI.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/firebase/genkit/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install the Genkit CLI globally using npm:genkit-cli package and provides the genkit command for interacting with the Genkit AI framework.
Core Commands
start
Run your application in development mode with telemetry and Developer UI:-n, --noui- Do not start the Developer UI-p, --port <port>- Port for the Developer UI (defaults to 4000-4099 range)-o, --open- Open the browser on UI startup--disable-realtime-telemetry- Disable real-time telemetry streaming--cors-origin <origin>- Specify the allowed origin for CORS requests
ui:start
Start the Developer UI standalone (connects to runtimes in the same directory):-p, --port <number>- Port to serve on (defaults to 4000)-o, --open- Open the browser on UI startup
ui:stop
Stop the running Developer UI server:Flow Commands
flow:run
Run a flow with provided input data:<flowName>- Name of the flow to run[data]- JSON data to use as input (optional)
-w, --wait- Wait for the flow to complete-s, --stream- Stream output-c, --context <JSON>- JSON object passed to context--output <filename>- Name of the output file to store results
flow:batchRun
Batch run a flow using a set of data from a file:<flowName>- Name of the flow to run<inputFileName>- JSON file containing batch data
-w, --wait- Wait for the flow to complete-c, --context <JSON>- JSON object passed to context--output <filename>- Name of the output file to store results--label [label]- Label flow runs in this batch
Evaluation Commands
eval:run
Evaluate a dataset against configured evaluators:<dataset>- Dataset to evaluate (JSON file)
--output <filename>- Output file for evaluation results--output-format <format>- Output file format (csv, json) - defaults to json--evaluators <evaluators>- Comma-separated list of evaluators to use--batchSize <batchSize>- Batch size for parallel evaluations (default: 1)--force- Automatically accept all interactive prompts
eval:flow
Evaluate a flow against configured evaluators:<flowName>- Name of the flow to evaluate[data]- JSON data to use as input (optional)
--input <input>- Input dataset ID or JSON file for evaluation-c, --context <JSON>- JSON object passed to context-o, --output <filename>- Output file for evaluation results--output-format <format>- Output file format (csv, json)-e, --evaluators <evaluators>- Comma-separated list of evaluators--batchSize <batchSize>- Batch size for parallel evaluations-f, --force- Automatically accept all interactive prompts
eval:extractData
Extract evaluation data for a flow from the trace store:--output <filename>- Output file for extracted data--maxRows <maxRows>- Maximum number of rows (default: 100)--label [label]- Filter by flow run label
Configuration Commands
config
Set development environment configuration:init
Initialize a project directory with Genkit:Global Options
--no-update-notification- Do not show update notification--non-interactive- Run in non-interactive mode (use default choices)--version- Display the CLI version--help- Display help information
Tips
- Use
genkit startduring development to automatically collect traces and test flows in the Developer UI - The CLI automatically detects your project root and runtime environment
- Set the
GENKIT_ENVenvironment variable todevwhen running your application to enable development features - Use
--streamflag with flow commands to see output as it’s generated - View evaluation results in the Developer UI at
/evaluate/<evalRunId>
Next Steps
- Learn about the Developer UI for visual testing and debugging
- Explore Testing strategies for AI applications
- Read about Debugging techniques for flows