Dev UI & CLI
Genkit provides a developer UI and CLI for testing, debugging, and inspecting your AI logic.
Installing the CLI
Section titled “Installing the CLI”npm install -g genkitStarting the Dev UI
Section titled “Starting the Dev UI”Run your application with the Genkit CLI to launch the developer UI:
genkit start -- ./run.sh# Or:genkit start -- mvn exec:javaThe Dev UI launches at http://localhost:4000 by default.
What the Dev UI provides
Section titled “What the Dev UI provides”- List all registered actions — Flows, models, tools, prompts, retrievers, evaluators
- Run actions with test inputs — Execute flows interactively
- View traces — Inspect execution logs with full span details
- Manage datasets — Create and manage evaluation datasets
- Run evaluations — Execute evaluators and review results
Reflection server
Section titled “Reflection server”When running in dev mode (devMode(true)), Genkit starts a reflection server on port 3100 (configurable via reflectionPort()). The Dev UI connects to this server.
Genkit genkit = Genkit.builder() .options(GenkitOptions.builder() .devMode(true) .reflectionPort(3100) // Default port .build()) .build();Running flows from the CLI
Section titled “Running flows from the CLI”# Run a flowgenkit flow:run tellJoke '"pirates"'
# Run with streaming outputgenkit flow:run tellJoke '"pirates"' -s