Documentation Index
Fetch the complete documentation index at: https://docs.trykode.xyz/llms.txt
Use this file to discover all available pages before exploring further.
kode init gets your project ready for Kode in a single step. It creates a .kode/ directory, writes a kode.json configuration file with sensible production-ready defaults, auto-detects your test command from the project root, and downloads the Sicario SAST binary that powers the security gate. Running init takes under ten seconds and requires no arguments.
Synopsis
What it does
- Creates
.kode/in your project root (or the directory you specify). - Writes
.kode/kode.jsonwith all engine, provider, and permission fields populated. If akode.jsonalready exists, the command exits without overwriting it. - Auto-detects your test command by scanning the directory for well-known project files:
go.mod→go test ./...package.json→npm testCargo.toml→cargo testpyproject.toml/requirements.txt→pytestGemfile→bundle exec rspec
- Downloads Sicario — Kode’s embedded SAST binary — into
.kode/. The security gate uses Sicario to block patches that introduce high or critical findings. If the download fails (e.g. no network), you can install it later withkode install sicario.
Arguments
Optional target directory. Defaults to the current working directory. Kode resolves the path to an absolute location before creating
.kode/ inside it.Generated kode.json
The file written to.kode/kode.json contains every supported field. Edit it freely after running init.
Engine fields
When
true, Kode refuses to write to production source files if no corresponding test file exists in the codebase. Disable only if your project has no tests yet.The shell command used to run your test suite. Kode appends this as the final step of the
kode loop pipeline and rolls back if it exits non-zero.Maximum number of files a single verify round is allowed to touch. Patches that exceed this limit are rejected before any gate runs.
Cost ceiling per
kode loop cycle in USD. Kode estimates token costs using current model pricing and aborts generation once the budget is reached.When
true, Kode obfuscates variable and function identifiers in the code sent to the LLM. Useful for proprietary codebases where exposing symbol names is undesirable.Example output
Running
kode init in a directory that already has .kode/kode.json will not overwrite it. The command prints an error and exits cleanly. Delete the existing file or specify a different directory if you want to regenerate it.kode.json field, see the kode.json configuration reference.