This guide walks you through installing the Kode CLI, initializing a project, and running your first AI-generated patch through the 6-gate verification pipeline — all without writing a line of configuration by hand. By the end, you’ll have a working Kode setup and an understanding of what happens between your prompt and the first file write.Documentation Index
Fetch the complete documentation index at: https://kode-f177b001.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Install Kode
Choose the installation method that matches your platform. All methods install the same compiled Go binary and register After installation completes, confirm it worked:You should see output like
kode on your PATH.kode v3.6.9 (commit: abc1234, date: 2025-07-01).Initialize your project
Run This creates The
kode init from the root of the project you want to work in. Kode automatically detects your project type (Go, Node.js, Rust, Python, etc.) and scaffolds a sensible configuration..kode/kode.json with the following defaults:init command also attempts to download and install Sicario — Kode’s integrated SAST security scanner — into .kode/. If that step fails (for example, in an offline environment), you can install it later with kode install sicario.The defaults are deliberately conservative: TDD mode is on (test files must exist before production writes), blast radius is capped at 3 files, and the token budget is $1.50 per loop cycle. Adjust these in
.kode/kode.json to match your workflow. See Configuration Reference for all available options.Set your API key
Kode is a Bring Your Own Key platform — you bring the LLM credentials, Kode provides the verification engine. Set your API key as an environment variable:Kode also reads Or add a Kode supports 25+ providers out of the box, including Anthropic, Google Gemini, Groq, Amazon Bedrock, Azure OpenAI, OpenRouter, and any OpenAI-compatible endpoint.
OPENAI_API_KEY if KODE_LLM_API_KEY is not set. To configure a non-OpenAI provider or override the endpoint, either set the env var directly:providers block to your .kode/kode.json:Run your first verified patch
Use You’ll see the pipeline execute in real time:Each
kode run to generate, verify, and apply a code change in one step:KODE_GATE: line is a gate in the verification pipeline passing. If any gate fails, the patch is rejected and Kode feeds the compiler-grade error back to the model for self-correction before retrying.kode run is shorthand for kode generate --apply. It generates structured code hunks from the LLM, drives each hunk through the 6-gate verification pipeline (Syntax → Imports → Calls → Blast Radius → Architecture → Security), and writes only passing hunks to disk — all in a single command.Check your verification stats
After running a few tasks, inspect the aggregate verification metrics logged to The stats dashboard shows pass/fail rates, average verification duration, most frequently failing files, failure type breakdown by gate, and a daily trend chart for the last 14 days. This is the fastest way to understand whether your project is generating clean patches or fighting the same class of LLM error repeatedly.
logs/kode.log:What’s next
Now that you have Kode running, explore the deeper configuration options and concepts:- Configuration Reference — Every field in
.kode/kode.jsonexplained, including TDD mode, blast radius thresholds, Blindfold mode, and MCP server config. - Verification Pipeline — How the 6 gates work, how they interact, and how to tune each one for your project.
- Ghost Branches — Parallel speculative execution: run multiple strategies simultaneously and merge the highest-scoring survivor.
- CLI Overview — Full reference for
plan,generate,verify,loop,daemon,stats,mcp, and all other commands.