# Kode ## Docs - [kode daemon — Background Code Health Monitor](https://docs.trykode.xyz/cli/daemon.md): kode daemon watches your git history, detects blast radius growth and circular dependencies, and proposes Ghost Branch fixes when thresholds are crossed. - [kode explain — Diagnose Gate Failure Details](https://docs.trykode.xyz/cli/explain.md): kode explain prints a detailed Markdown explanation of a gate failure type, with causes, fixes, and recent examples pulled from your audit log. - [kode generate — LLM-Powered Structured Code Patches](https://docs.trykode.xyz/cli/generate.md): kode generate sends a task prompt to an LLM and returns structured JSON hunks. Use --apply to also verify and apply the patches to your codebase. - [kode golf — Competitive Code Optimization](https://docs.trykode.xyz/cli/golf.md): kode golf runs three parallel optimization strategies on a source file, benchmarks each against the original, and merges the winning version. - [kode init — Scaffold Your Kode Project Configuration](https://docs.trykode.xyz/cli/init.md): kode init scaffolds a .kode/kode.json config file in your project root with TDD mode, blast radius limits, token budgets, and auto-detected test commands. - [kode loop — Full Automated Coding Pipeline with Rollback](https://docs.trykode.xyz/cli/loop.md): kode loop runs the full Kode workflow: generate, verify, apply, and test — with automatic rollback on test failure. Supports Ghost Branch parallel mode. - [kode mcp serve — MCP Server for External Agents](https://docs.trykode.xyz/cli/mcp.md): kode mcp serve starts a stdio MCP server so external agents like Claude Desktop can call Kode's Context Engine and verification pipeline as tools. - [Kode CLI Reference — Commands, Flags, and Concepts](https://docs.trykode.xyz/cli/overview.md): Complete reference for all Kode CLI commands. Kode uses a hybrid Go+TypeScript architecture — all commands are accessible from the kode binary. - [kode plan — Build a Token-Capped Codebase Context Graph](https://docs.trykode.xyz/cli/plan.md): kode plan uses Tree-sitter AST analysis to build a surgical context graph of relevant files and symbols, capped at 8,000 tokens by default. - [kode run — Generate and Apply Verified Code Patches](https://docs.trykode.xyz/cli/run.md): kode run generates code from a prompt, passes it through Kode's 6-gate verification pipeline, and applies verified patches to your codebase in one step. - [kode stats — View Verification Statistics](https://docs.trykode.xyz/cli/stats.md): kode stats parses the kode.log audit file and prints pass/fail rates, top-failing files, failure type breakdown, model usage, and a daily trend chart. - [kode tui — Launch the Terminal User Interface](https://docs.trykode.xyz/cli/tui.md): kode tui launches Kode's Terminal UI, downloading the binary from GitHub Releases on first run. Supports --port, --hostname, and --mdns flags. - [kode verify — Run the 6-Gate Verification Pipeline](https://docs.trykode.xyz/cli/verify.md): kode verify runs Kode's 6-gate pipeline on a JSON input file containing hunks or proposed file contents. Exits 0 on PASS, 1 on FAIL. - [Blindfold Mode: Privacy-First AI Code Generation](https://docs.trykode.xyz/concepts/blindfold-mode.md): Blindfold Mode SHA-256 obfuscates your identifiers before any LLM sees them, then reverses the mapping on output to keep proprietary codebases private. - [Ghost Branches: Parallel AI Strategy Exploration](https://docs.trykode.xyz/concepts/ghost-branches.md): Ghost Branches run parallel git worktrees with competing AI strategies, score each result objectively, and merge the winning branch back into your project. - [TDD Mode: Enforce Test-First AI Code Generation](https://docs.trykode.xyz/concepts/tdd-mode.md): TDD Mode enforces test-driven development by blocking Kode from writing production code until a corresponding test file exists in your project. - [Kode Verification Pipeline: Six Gates, Zero Guesses](https://docs.trykode.xyz/concepts/verification-pipeline.md): How Kode's six-gate pipeline catches syntax errors, hallucinated imports, bad calls, and security issues before any generated code reaches your disk. - [Kode Environment Variables: API Keys, Endpoints, and Paths](https://docs.trykode.xyz/configuration/environment-variables.md): All environment variables Kode reads at startup: API keys, model selection, endpoint overrides, path configuration, and server auth. - [kode.json Configuration Reference for Kode Projects](https://docs.trykode.xyz/configuration/kode-json.md): The .kode/kode.json file controls Kode's model selection, verification engine settings, token budgets, and provider configuration. Created by kode init. - [Kode AI Provider Configuration: Gateway, Direct Providers](https://docs.trykode.xyz/configuration/providers.md): Configure AI providers in Kode: the Kode Gateway for unified access, or direct connections to OpenAI, Anthropic, Google, Groq, and more. - [Optimize Code Performance with Kode Golf](https://docs.trykode.xyz/guides/code-golf.md): Kode Golf uses parallel Ghost Branch worktrees to apply competing optimization strategies to a file, benchmarks them, and merges the best-performing version. - [Automate Tech Debt Detection with Kode Daemon](https://docs.trykode.xyz/guides/daemon-mode.md): Kode Daemon runs silently in the background, watching your git history for code health trends and proactively suggesting fixes on Ghost Branches. - [Run Your First Task with Kode](https://docs.trykode.xyz/guides/first-task.md): Walk through running your first AI-generated code task with Kode, from project initialization to seeing a verified patch applied to your codebase. - [Automate Code Tasks with Kode Loop Mode](https://docs.trykode.xyz/guides/loop-mode.md): Kode Loop runs the full Plan→Generate→Verify→Apply→Test pipeline end-to-end, with automatic rollback if tests fail and optional Ghost Branch parallel strategies. - [Integrate Kode with Claude Desktop via MCP](https://docs.trykode.xyz/guides/mcp-integration.md): Run kode mcp serve to expose Kode's Context Engine and Verification-on-Write pipeline as MCP tools usable by Claude Desktop and other MCP-compatible agents. - [How to Install the Kode CLI on macOS, Linux, and Windows](https://docs.trykode.xyz/installation.md): Install the Kode CLI via shell script, NPM, or build from source on macOS, Linux, and Windows. Includes first-run setup and upgrade instructions. - [Kode: The Contrarian, Verification-First AI Coding Agent](https://docs.trykode.xyz/introduction.md): Kode replaces the generate-and-pray AI coding paradigm with a 6-gate verification pipeline that validates every patch before it touches your filesystem. - [Quickstart: Install Kode and Run Your First Verified Patch](https://docs.trykode.xyz/quickstart.md): Install Kode, initialize your project, set your API key, and run your first AI-generated verified code change in five minutes or less. - [Kode FAQ: Installation, Configuration, and Gate Failures](https://docs.trykode.xyz/troubleshooting/faq.md): Answers to common questions about Kode installation, configuration, verification gates, model support, Ghost Branches, and CI/CD usage. - [Kode Verification Gate Failures: Diagnosis and Fixes](https://docs.trykode.xyz/troubleshooting/gate-failures.md): Diagnose Kode verification gate failures for syntax, imports, calls, blast radius, architecture, and security. Covers causes and fixes for each gate.