Skip to main content

Overview

Kilo Code CLI is the terminal version of Kilo Code. It uses the same agent runtime and kilo.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 kilo command.
  • 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

Verify the installation:
This guide targets Kilo CLI 1.0 and later. Run kilo upgrade if you have an older version.
  1. Sign in to the EvoLink console.
  2. Open API Keys and create a key.
  3. Copy the raw key and keep it secure.
Store the key in an environment variable so it is not committed with your configuration:
Set the raw key only. Do not add a Bearer prefix. Kilo’s OpenAI-compatible provider creates the authorization header automatically.

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
Kilo Code resolves {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:
Key details:
Use https://direct.evolink.ai/v1 as the Base URL. Do not append /chat/completions. Model settings must remain under provider.evolink.models.

Step 2: Validate the Configuration

Check the JSONC structure:
Inspect the models Kilo loaded for EvoLink:
You should see models such as 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:
Run /models and confirm that evolink/claude-sonnet-5 is selected. Then send a read-only task:
Successful configuration means:
  • 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:
Useful slash commands: Run a one-off task without entering the full TUI:
Temporarily select another model:
Suggested model roles:

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:
Do not use /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 that provider.evolink.models.<modelID>.limit.context exists and is not 0. Kilo cannot compact custom-model conversations correctly without this value.

References