Overview
Kilo Code CLI is the terminal version of Kilo Code. It uses the same agent runtime andkilo.jsonc configuration as the VS Code extension, while keeping installation, model selection, task execution, and troubleshooting in the command line.
This tutorial shows you how to:
- Install and start the
kilocommand. - Connect EvoLink through an OpenAI-compatible provider.
- Configure tool calling and token limits for Claude models.
- Verify file tools from the terminal.
Prefer VS Code?
Follow the dedicated Kilo Code VS Code tutorial instead.
Before You Begin
1. Install Kilo Code CLI
- npm
- Install script
- Homebrew
This guide targets Kilo CLI 1.0 and later. Run
kilo upgrade if you have an older version.2. Get an EvoLink API Key
- Sign in to the EvoLink console.
- Open API Keys and create a key.
- Copy the raw key and keep it secure.
- macOS / Linux
- Windows PowerShell
Step 1: Create the Kilo Configuration
Kilo CLI reads configuration from:- Global:
~/.config/kilo/kilo.jsonc - Project root:
./kilo.jsonc - Project directory:
./.kilo/kilo.jsonc
{env:EVOLINK_API_KEY}-style references only in trusted config — the global config (~/.config/kilo/), a config passed via KILO_CONFIG, or organization-managed config. Project-level kilo.jsonc / .kilo/kilo.jsonc files cannot resolve {env:} references (this prevents a repository’s config from stealing credentials). Since this tutorial reads the key from an environment variable, save the following configuration to the global kilo.jsonc; project files are only suitable for overrides that don’t reference secrets, such as the default model:
Step 2: Validate the Configuration
Check the JSONC structure:evolink/claude-sonnet-5 with their configured context and output limits.
After changing configuration, restart Kilo or run /reload from an active interactive session.
Step 3: Start the Terminal Agent
Open the project you want Kilo to work on:/models and confirm that evolink/claude-sonnet-5 is selected. Then send a read-only task:
- Kilo invokes a file-reading tool instead of returning only conversational text.
- The value matches the project file.
- No
401,404,model_not_found, or unsupported-tool error appears.
Step 4: Common CLI Workflows
Start the interactive terminal UI:
Run a one-off task without entering the full TUI:
Troubleshooting
kilo: command not found
Make sure the global npm executable directory is on PATH, then restart the terminal. Use npm prefix -g to locate the global installation directory.
kilo config check reports errors
Check JSONC commas and braces, confirm that provider, models, and options have the same nesting as the example, and use evolink/model-id for the default model.
401 unauthorized
Confirm that EVOLINK_API_KEY exists in the same terminal session that starts Kilo. Do not print the full key into logs or screenshots, and do not add a Bearer prefix.
404 or a duplicated request path
Set baseURL back to:
/v1/chat/completions as the Base URL.
model_not_found
Model IDs must exactly match EvoLink. Run kilo models evolink --verbose and do not add an anthropic/ prefix or remove date suffixes.
Chat works but file tools do not
Confirm that the model includes"tool_call": true. Retry with claude-sonnet-5 or claude-fable-5 if a weaker model cannot reliably drive tools.
Long sessions exceed the context window
Confirm thatprovider.evolink.models.<modelID>.limit.context exists and is not 0. Kilo cannot compact custom-model conversations correctly without this value.