Configuration Guide
Understanding niki.toml format, precedence, and IDE schema integration.
niki.toml Configuration Guide
NIKI reads configuration from niki.toml located in the root of your repository.
Precedence Order
NIKI resolves configuration values using strict precedence:
- CLI Flags (e.g.
--planner-model claude-sonnet-4-20250514,--backend worktree) - Environment Variables (e.g.
ANTHROPIC_API_KEY,OPENAI_MODEL) - OS Keyring (
niki auth login) - Project
niki.tomlin current working directory - Built-in Defaults
IDE Schema Integration
To enable schema validation, hover docs, and autocompletion in VS Code, add the schema comment at the top of your niki.toml:
#:schema https://raw.githubusercontent.com/RavaniRoshan/niki/master/schemas/niki.schema.json
[general]
max_revision_rounds = 3
output_dir = ".niki"
spend_cap_usd = 5.0