Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Precedence

When multiple sources specify the model, provider, or API key, the highest-priority source wins:

1. CLI flags          --model, --provider, --base-url        (highest)
       ↓
2. Shell env vars     KODA_MODEL, KODA_PROVIDER, KODA_BASE_URL
       ↓
3. Keystore / DB      saved by /model, /provider, /key (injected at startup)
       ↓
4. Built-in defaults  Claude Sonnet via Anthropic              (lowest)

API keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, …) follow the same chain. Keys saved with /key are injected at startup — but a key already in the shell environment takes precedence and is never overwritten.

# Per-call override (doesn't change saved config)
koda "review auth.rs" --model o3

# Per-project via direnv (.envrc)
export KODA_MODEL=gemini-2.5-pro

# CI / GitHub Actions
ANTHROPIC_API_KEY=${{ secrets.ANTHROPIC_KEY }} koda -p "check types"

Config files

Everything lives in ~/.config/koda/:

PathContent
db/koda.dbSQLite — sessions, messages, settings, API keys, input history
logs/koda.logRolling daily tracing log (not shown in the TUI)
agents/Global custom agent JSON definitions
skills/Global custom skill markdown files
memory.mdGlobal memory (injected into all system prompts)

Project-level overrides live in .koda/ at your project root and take priority over global config:

PathContent
.koda/agents/Project-specific agent definitions
.koda/skills/Project-specific skills
MEMORY.mdProject memory (also checks CLAUDE.md, AGENTS.md)