Prerequisites
- Kode installed and available on your
PATH(kode --versionshould print a version string) - A code project inside a git repository (Kode reads and writes files relative to the repo root)
- Your API key exported as
KODE_LLM_API_KEYorOPENAI_API_KEY
Steps
Understanding gate failures
When a hunk fails verification, the log entry records the gate name and a short message. Usekode explain <check> to get a full description of that gate, its common causes, and suggested fixes:
explain command also prints up to five recent examples pulled from logs/kode.log so you can see which files triggered the gate in your own project.
kode run is a shortcut for kode generate --apply. It generates patches and immediately applies verified ones, but it does not run your test suite after applying. Use kode loop when you want the full Plan → Generate → Verify → Apply → Test pipeline with automatic rollback on test failure.Next steps
Loop Mode
Run the full pipeline with test execution and automatic rollback — including Ghost Branch parallel strategies.
Verify CLI
Run the verification gate directly against a JSON hunk file or a set of proposed file contents.