Kilo Code: install the CLI, sign in, agents and config (2026)
Kilo Code as of November 2026: the CLI (@kilocode/cli 7.8.40), Kilo credits or your own key, sign-in over SSH, agents, kilo.json, and kilo run --auto.
Kilo Code is an open-source (MIT) coding agent that runs as a VS Code extension, a JetBrains plugin and a terminal CLI, all on one engine; its README says the CLI “is a fork of OpenCode”. Install the CLI with npm install -g @kilocode/cli and run kilo; extension and CLI were both at 7.8.40 as of November 30, 2026. Sign in to a Kilo account (prepaid credits at the provider’s rate plus a 5% payment fee, or a monthly Kilo Pass), or bring your own key: Kilo’s docs count over 30 providers, OpenRouter, Anthropic and OpenAI among them. On a server over SSH, the Kilo sign-in prints a URL and a code you enter on your own laptop or phone. One catch: in the CLI and VS Code it edits files without asking by default, and kilo run --auto approves every permission request, shell commands included, that a rule does not explicitly deny.
What Kilo Code is now
The Kilo-Org/kilocode README describes an agent that works in VS Code, JetBrains and the terminal, offers more than 500 models you can switch between mid-task, and says you “pay the model provider’s rate with zero markup.” The licence file carries two copyright lines, Kilo Code’s and opencode’s, and the README states the lineage plainly:
Kilo CLI is a fork of OpenCode, enhanced to work within the Kilo agentic engineering platform.CopiedThat is a recent shape. The extension most older tutorials describe, with its Architect, Code and Debug modes, now lives in the archived kilocode-legacy repository, whose README says the legacy VS Code extension and JetBrains plugin “reached end of life on July 31, 2026.” The current extension, per Kilo’s what’s new page, was “completely rebuilt on a portable, open-source core shared across VS Code, the CLI” and Kilo’s other products: modes are now called agents, checkpoints are snapshots, and the old auto-confirm list became per-tool permissions. Settings written for the old extension do not describe the new one.
Releases ship the extension and the CLI together. As read on November 30, 2026:
| Where | Name | Version |
|---|---|---|
v7.8.40, November 27, 2026, with the .vsix and the CLI builds | 7.8.40 | |
npm | @kilocode/cli, commands kilo and kilocode | 7.8.40 |
VS Code Marketplace | kilocode.Kilo-Code, 1,777,612 installs | 7.8.40 |
Open VSX (Cursor, VSCodium, Windsurf) | kilocode/Kilo-Code, 4,889,896 downloads | 7.8.40 |
One disagreement to know about: Kilo’s install page still says the rebuilt extension is distributed as the pre-release version on the VS Code Marketplace and to pick “Install Pre-Release Version” (while calling it “stable and recommended for all users”), whereas Open VSX lists 7.8.40 as a regular release. The page asks for VS Code 1.84.0 or later.
Install the Kilo Code CLI
The README gives six routes. The npm package carries no engines field; it pulls in a prebuilt binary for your platform (Linux, macOS and Windows, x64 and arm64) as an optional dependency, and no minimum Node.js version is stated.
npm install -g @kilocode/cli # or: pnpm add -g / bun add -g @kilocode/cli
brew install Kilo-Org/tap/kilo # Homebrew, macOS or Linux
paru -S kilo-bin # Arch Linux (AUR)
# the install script runs whatever the URL serves; read it first if that matters
curl -fsSL https://kilo.ai/cli/install | bash
kilo --versionCopiedIf a global npm install fails with a permissions error, the npm install -g guide covers why. On a CPU without AVX support, the CLI can die at start with “Illegal instruction”; Kilo’s fix is to download the -baseline build for Linux, macOS or Windows x64 from the releases page and run its kilo binary directly. A statically linked musl build exists for Alpine and minimal Docker images without glibc. Update later with kilo upgrade or npm update -g @kilocode/cli.
Paying for models: a Kilo account or your own key
The README’s “No API keys required to start” means signing in to a Kilo account, which you can do with email, Google, GitHub, GitLab, Apple, a ChatGPT or Claude login and others. Requests then go through Kilo Gateway, billed from your balance:
- Credits. Per Kilo’s credits page, “$1 of purchased credits funds $1 of usage” and inference “matches the provider’s API rates with no markup”; each purchase carries a separate 5% payment-processing fee, and bought credits expire a calendar year after purchase.
- Kilo Pass, a monthly credit subscription in three tiers, priced on Kilo’s own site.
- Free models.
kilo-auto/freeroutes to free models, but Kilo’s free-use page warns it “may route your requests to providers that log prompts and outputs and use them to improve their services.” Keep private code away from it.
The alternative is a provider of your own. Inside kilo, /connect adds one; Kilo’s docs count over 30, including OpenRouter, Anthropic, OpenAI, Gemini, DeepSeek, Mistral, Bedrock, Vertex and Ollama for local models. Two subscription routes are documented: ChatGPT Go, Plus or Pro via kilo auth login --provider codex, which fails at the plan’s limit rather than falling back to paid billing; and “Claude linked billing”, which in Kilo’s words “works with Claude API organizations only, billed per token at API pricing”; the same page says “Claude Pro and Max subscriptions do not qualify.” Where Claude subscriptions stand with other third-party tools is in using a Claude subscription in Hermes, Pi and OpenCode. Kilo also has a BYOK mode where you store a provider key on your Kilo account and keep Kilo Gateway as the provider.
Signing in on a remote server over SSH
The Kilo account sign-in is a device authorization flow, so nothing on the server has to be reachable from your browser. Run kilo auth login (or /connect inside the TUI) and choose Kilo Gateway, whose one method is “Kilo Gateway (Device Authorization)”. It tries to open a browser on the server, which on a headless box does nothing, and shows:
Open <verification URL> and enter code: <code>CopiedOpen that URL on your laptop or phone, sign in, enter the code, and the SSH session carries on. A refusal ends with “Authorization denied by user”, a slow approval with “Authorization code expired”. Kilo’s CLI page gives the general rule for links: they open “on the machine running Kilo”, so over SSH you select and copy the visible URL. The ChatGPT sign-in has a headless option of its own, a device code the docs recommend “on a remote host, or behind SSH, Docker, or WSL.”
Credentials land in auth.json in Kilo’s data directory, ~/.local/share/kilo/ on Linux, written readable by your user only; kilo auth list shows what is stored. In the source the Kilo token is saved with an expiry a year out. For an API key from a provider like OpenRouter (the OpenRouter API key guide covers making one), /connect is the simplest route. If you would rather supply it as the environment variable the docs use, keep it in an owner-only file instead of your shell history:
mkdir -p ~/.config/kilo
read -rsp 'OpenRouter key: ' k; echo
(umask 077; printf 'OPENROUTER_API_KEY=%s\n' "$k" > ~/.config/kilo/openrouter.env); unset k
# start kilo with the key in its environment only (a subshell, so your shell never holds it)
(set -a; . ~/.config/kilo/openrouter.env; exec kilo)CopiedThe first printf overwrites that file, so run it once per key. To keep a session alive after you disconnect, start kilo inside tmux. One feature to leave off on a shared account: kilo remote relays sessions in real time, and the CLI page warns that “Anyone with access to your Kilo account can send messages to your computer when remote mode is enabled.”
Agents (the old modes)
Per the agents page and the source, as of November 30, 2026:
| Agent | What it does | What it may do |
|---|---|---|
code (default) | Writes and changes code | All tools; shell commands outside a read-only list ask first |
plan | Designs and writes a plan (the old Architect) | Edits only plan files in .kilo/plans/; other shell commands denied |
ask | Answers questions about the code | “All write operations are blocked”; read-only commands only |
debug | Diagnoses and fixes bugs | All tools, like code |
orchestrator | Delegates to other agents | No shell; “deprecated and will be removed in a future release” |
In the CLI, Tab and Shift+Tab cycle agents, /agents lists them, and default_agent in the config sets the one you start in. /models switches model. Beyond fixed models, Kilo Gateway offers three routers: kilo-auto/frontier, kilo-auto/efficient and kilo-auto/free. Elsewhere a model is named provider/model, for example openrouter/anthropic/claude-sonnet-4-20250514 in the OpenRouter page’s own example.
What it does without asking
The defaults come from OpenCode, with Kilo’s changes. Kilo’s auto-approve page says “Most tools default to "*": "allow"”, and that file edits ask for approval by default only in the JetBrains plugin. So in the CLI and VS Code the code agent edits files straight away. Shell commands are stricter in the source: Kilo’s default for bash is ask, with read-only commands such as cat, grep and rg allowed, plus touch, mkdir, cp, mv, tar, unzip and a few others. The auto-approve page does not list bash among its exceptions, so check what your own install asks before relying on either. Reading .env files and anything outside the project asks. Rules go under permission in kilo.json, as allow, ask or deny per tool and pattern, with the last matching rule winning; the OpenCode permissions guide explains the same syntax. To have edits ask too, in ~/.config/kilo/kilo.json:
{
"permission": {
"edit": "ask",
"bash": { "*": "ask", "git status*": "allow", "git diff*": "allow" }
}
}CopiedWhere it keeps its config
| Path (Linux and macOS) | What it holds |
|---|---|
~/.config/kilo/kilo.json or kilo.jsonc | Your settings: model, providers, permissions, MCP servers |
./kilo.json or ./.kilo/ | The project’s settings, which take precedence over yours |
~/.config/kilo/tui.json | Themes, keybindings, notifications |
~/.local/share/kilo/auth.json | Stored sign-ins and keys, owner-only |
AGENTS.md (or AGENT.md) at the project root | Project instructions, loaded automatically and write-protected |
A global opencode.json inside ~/.config/kilo/ is still read as a legacy name, but the CLI page warns that “Kilo no longer falls back to opencode configuration stored in .opencode directories”, so settings in ~/.config/opencode/ do not carry over. kilo debug paths prints the real directories, and KILO_CONFIG_DIR moves the config one. One safety rule is built in: {env:VAR} references only work in your own config, not in a kilo.json committed to a repository, so a cloned project cannot point your secrets elsewhere. On a server, KILO_TELEMETRY_LEVEL=off turns product telemetry off. Kilo reads AGENTS.md and also looks in .claude/ and .agents/ folders; more on the file in what AGENTS.md is.
Scripted and headless runs
kilo run takes a message, does the task and exits:
kilo run "summarize what this repository does" --agent ask
kilo run "explain the failing test" --model openrouter/anthropic/claude-sonnet-4-20250514 --format json
# DANGEROUS: --auto approves every permission request a rule does not deny,
# any shell command included. Kilo: "Only use it in trusted environments."
kilo run --auto "run tests and fix any failures"CopiedWithout --auto, in the CLI page’s words, “a non-interactive run cannot prompt for approval and auto-rejects any permission request it receives”. Since edits are allowed by default, a plain kilo run in the code agent can still change files; use --agent ask or plan when you want none. --auto is described in the CLI reference as “auto-approve permissions that are not explicitly denied (dangerous!)”, and the README says “Only use it in trusted environments.” With it, any shell command the model chooses runs as your user, so on a server run it as an ordinary user in a repository you can afford to have changed, and add deny rules for what must never run. Exit codes are 0 for success, 124 for a timeout and 1 for an error. kilo serve starts a headless server that kilo run --attach can drive.
Kilo Code, OpenCode, Cline and Roo Code
These four come up together, and each project’s own pages settle most of the confusion:
- OpenCode is the upstream of Kilo’s CLI. Its README calls it “The open source AI coding agent.” Kilo’s repository holds a
.opencode-versionfile reading v1.18.26, while OpenCode itself now ships 2.x as@opencode/cli(2.4.3 on November 30, 2026), so features and settings in OpenCode’s newest docs may not be in Kilo yet. Kilo adds the editor extensions, Kilo Gateway, the account and the agents above. Installing OpenCode on Linux covers the original. - Cline is a separate Apache 2.0 agent, “The open source coding agent in your IDE, terminal, & desktop!”, with its own CLI (
npm i -g cline). Cline vs Claude Code compares it in depth. - Roo Code has ended. Its README says “The Roo Code Extension was shut down on May 15th” and points to ZooCode, a community fork, and to Cline, “from where Roo Code originated.” Kilo’s legacy repository carries a “Coming from Roo Code?” migration link.
For the wider field, OpenCode alternatives and Claude Code alternatives set the terminal agents side by side.