Kilo
Kilo Code CLI
- kilo
OpenCode fork with its own XDG folder, OpenCode's MCP shape and a provider filter on models.
- Invoke
- 2 of 6 · official
- Models
- native listing
- MCP
- jsonc · opencode
- Agents file
- ~/.config/kilo/AGENTS.md
Access
- Get
getHarness("kilo") - CLI
harnesses paths kilo --json - Trykilo in the explorer
Kilo Code CLI is an OpenCode fork, and it doesn't hide it. The source marks every change with kilocode_change, which makes reading it oddly pleasant. Sessions go into one SQLite database, ~/.local/share/kilo/kilo.db, on an older OpenCode schema.
Config is kilo.jsonc or kilo.json under ~/.config/kilo/ on every platform, Windows included. Projects keep it in the root or under .kilo/, which wins. Kilo still merges config.json and leftover opencode.json files from the same places. ~/.config/opencode/ is no longer read.
Global rules live in ~/.config/kilo/AGENTS.md, and that's the file agents sync links. Until Kilo's Claude Code migration runs, a missing one falls back to ~/.claude/CLAUDE.md. Skills come from ~/.config/kilo/skills/ plus ~/.kilo/skills/, ~/.agents/skills/ and ~/.claude/skills/. Skills sync owns the first one. After a full sync Kilo finds every skill more than once. Redundant? Sure. Harmless too.
Commands, which Kilo calls workflows, are Markdown in .kilo/commands/ and ~/.config/kilo/commands/. Prompt sync writes there. /goal is reserved, so a command with that name loses.
MCP servers sit under mcp in OpenCode's dialect. The registry maps both kilo.jsonc and kilo.json. Kilo merges both, with JSONC on top. It writes to the first file that exists, checking JSONC first. Sync and mcp-servers add pick the same file. Sync also empties the other one of servers, keep aside, because Kilo would still load them.
A JSONC edit touches only the server entry. Comments and trailing commas stay put, so the file still reads like yours.
kilo run is the headless mode, --format json the structured one. --variant carries reasoning effort and --pure skips external plugins, so extensions: false works. No advisor and no sandbox: its permissions are a ruleset, not a lock.
Kilo exports KILO_PID to everything it starts, which is how detection spots it. The OPENCODE=1 beside it is family resemblance, and the registry doesn't read it.
Capabilities and invocation
- mcp: yes
- vision: yes
- audio: no
- video: no
- tools: yes
- streaming: yes
Binary kilo, evidence official. --variant is the provider's reasoning effort; --pure skips external plugins. Model selection appends --model {model}.
- advisor{}rejected
- advisor · json{ structured: true }rejected
- read-only{ readOnly: true }rejected
- read-only · json{ readOnly: true, structured: true }rejected
- agent{ tools: true }
run {prompt} - agent · json{ tools: true, structured: true }
run --format json {prompt}
Model listing runs kilo models, and a filter matches the ids locally. Prints provider/model per line. Its one argument filters by provider, not by name.
Paths
Templates as the registry stores them. ~, ${HOME}, ${TMPDIR} and %VAR% expand in resolve(); entries tagged with a platform are dropped on the others. Open in the explorer to see them expanded for a home directory of your choice.
config
~/.config/kilo/kilo.jsoncXDG-based, same path on all platforms. Every user file here is merged, later ones winning.
~/.config/kilo/kilo.json~/.config/kilo/config.json~/.config/kilo/opencode.jsoncLeft over from OpenCode; ~/.config/opencode/ itself is no longer read.
~/.config/kilo/opencode.jsonkilo.jsonckilo.jsonopencode.jsoncopencode.json.kilo/kilo.jsoncWins over the root file when both exist. .kilocode/ is read the same way.
.kilo/kilo.json
sessions
~/.local/share/kilo/kilo.dbSQLite database with sessions, messages and parts, an older OpenCode schema. XDG-based, same path on all platforms.
instructions
AGENTS.mdCLAUDE.mdSupported for Claude Code compatibility.
CONTEXT.mdDeprecated.
~/.config/kilo/AGENTS.mdGlobal user-level instructions.
~/.claude/CLAUDE.mdFallback when the Kilo file is missing, until Kilo's Claude Code migration has run.
skills
.kilo/skills/.kilocode/skills/.agents/skills/.claude/skills/Claude Code compatible.
~/.config/kilo/skills/~/.kilo/skills/~/.agents/skills/Read by default, so the Codex skills target covers Kilo too.
~/.claude/skills/Claude Code compatible, until Kilo's Claude Code migration has run.
commands
.kilo/commands/Markdown slash commands, which Kilo calls workflows.
~/.config/kilo/commands/Global Markdown slash commands. /goal is reserved.
promptTemplates
.kilo/commands/Markdown slash commands, which Kilo calls workflows.
~/.config/kilo/commands/Global Markdown slash commands. /goal is reserved.
Empty
hookstempThat is not the same as the feature being missing.
MCP servers
~/.config/kilo/kilo.jsoncuser · jsonc · opencode · mcp~/.config/kilo/kilo.jsonuser · json · opencode · mcpkilo.jsonproject · json · opencode · mcp
Detection
envVars
- KILO_PID
projectMarkers
- .kilo
- .kilocode
- kilo.jsonc
- kilo.json
Persistence
- JSON/JSONC - Config files. (official)
- SQLite - Session and message storage. (official)
syncAgentsFiles links ~/.config/kilo/AGENTS.md to the master bundle.