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.
kode plan analyzes your codebase and produces a compact, task-focused context graph — only the files and symbols that are actually relevant to what you’re trying to do. It uses Tree-sitter for AST-level parsing, so it understands your code structurally rather than relying on fuzzy string matching. The graph is token-capped (8,000 by default) to keep LLM costs predictable and context quality high.
Synopsis
What it does
kode plan takes your task description, parses your codebase with Tree-sitter, builds a dependency graph of files and symbols, and trims it to fit within the token budget. The result shows you exactly which files and symbols Kode thinks are relevant, how they relate to each other, and what the LLM will see when you run kode generate or kode loop.
By default, kode plan prints a human-readable summary to the terminal. Use --packet to emit machine-readable JSON that you can pipe directly into kode generate or kode loop via --context-file.
Flags
Output the raw dependency graph as JSON instead of the human-readable summary. Useful for debugging context quality or piping into other tools.
Output the LLM-ready context packet as JSON. This is the compact representation that
kode generate and kode loop consume via --context-file.Maximum token budget for the context graph. Kode scores nodes by relevance and trims the graph from the bottom up until it fits within this limit.
Examples
Typical workflow: plan then loop
Runningkode plan --packet before a generation command is the most reliable way to handle multi-file tasks. The packet gives the LLM precise, AST-grounded context instead of a raw directory listing.
kode run:
Human-readable output
When run without--graph or --packet, kode plan prints a summary like this: