Skip to main content
The @kilocode/cli runs the Kilo Code agent in your terminal. This page covers only the CLI; for the VS Code extension, see Kilo Code (VS Code). The CLI speaks OpenAI-compatible APIs: point it at routing.run’s base URL and use route/… model IDs.
For the VS Code extension, see Kilo Code (VS Code).
Before you start, create an API key at app.routing.run under API Keys. Copy the full secret. It starts with rk_.

CLI

1

Install the CLI

Install the official package globally with bun:
bun install -g @kilocode/cli
You can also run it once without installing:
bunx @kilocode/cli kilo --help
2

Apply environment variables

Before running kilo, use the CLI connection prompt below (or add the same exports to your shell profile).
3

Run Kilo Code

Start the CLI with kilo. Use kilo models or your usual flow to pick a model; use IDs with the route/ prefix (for example route/glm-5.1).

CLI connection prompt

The Kilo CLI expects OpenAI-compatible variables (OPENAI_API_KEY, OPENAI_BASE_URL). Paste this when onboarding yourself or a teammate. It includes the full integration flow.

Kilo Code CLI — connect to routing.run

Manual configuration

If you want to configure Kilo Code CLI manually instead of using the prompt above, export these exact values before you run kilo:
export ROUTING_RUN_API_KEY='rk_REPLACE_ME'
export OPENAI_API_KEY="$ROUTING_RUN_API_KEY"
export OPENAI_BASE_URL="https://api.routing.run/v1"
If you keep multiple CLI backends locally, save these exports in a shell wrapper, env file, or named Kilo config called routing.run so switching providers is simpler. Use a model id with the route/ prefix, for example route/glm-5.1.
Auth and flags: Kilo CLI docs. If the CLI reads its own config file, set the same base URL and key there.
Plan tier and access are authoritative on GET https://api.routing.run/v1/models with your rk_ key. The full list is on the models page; common picks:
ModelUse case
route/deepseek-v3.2General-purpose chat (matches most doc examples)
route/glm-5.1Reasoning and coding
route/minimax-m2.7Long-context sessions
route/kimi-k2.5Agentic and tool-heavy flows
route/qwen3.6-plus-previewQwen3.6-class preview
route/qwen3.5-plusQwen3.5 flagship