Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Kilo Code CLI: Installation and Setup


title: ‘Kilo Code CLI: Installation and Setup’ authors:


Kilo Code CLI: Installation and Setup

Kilo Code CLI is a terminal-based AI coding agent from kilo.ai. It connects to the Kilo platform gateway, which proxies 500+ cloud models (including free-tier ones). It supports interactive TUI sessions, one-off task runs, and MCP server integration.

1. Install Kilo Code CLI

Prerequisites

Make sure Node.js 18+ is installed:

node --version
npm --version

Install via npm (user-local, no sudo)

Installing to ~/.local avoids permission issues on Fedora/Linux systems where /usr/local/lib is root-owned:

npm install -g @kilocode/cli --prefix ~/.local

Add ~/.local/bin to PATH

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

Verify:

kilo --version

2. Authenticate with Kilo Platform

Kilo CLI requires a Kilo account to use any model — including free-tier ones. Log in via browser OAuth:

kilo auth login

This opens a browser-based OAuth flow. Credentials are stored in ~/.local/share/kilo/auth.json.

kilo auth list    # show stored credentials
kilo auth logout  # log out

3. Launch Kilo Code

Interactive TUI (default)

Navigate to your project directory and run:

cd /path/to/my/project
kilo

This opens the full terminal UI where you can chat with the agent, approve file edits, and run shell commands interactively.

One-off task (non-interactive)

kilo run "add input validation to the signup form"

Key CLI flags

FlagDescription
-m kilo/<model>Set the model (must be a valid Kilo model ID)
-cContinue the last session
-s <session-id>Resume a specific session
--prompt "<text>"Pass an initial prompt non-interactively

4. Available Models

Kilo routes traffic through its gateway, which aggregates models from OpenRouter, Anthropic, Google, and others. Some models are free, others require Kilo credits.

List all available models:

kilo models            # list all model IDs
kilo models --verbose  # include cost and context window metadata

Free-tier models (as of March 2026)

Model IDNotes
kilo/kilo-auto/freeAuto-selected free model
kilo/openrouter/freeOpenRouter free tier proxy
kilo/arcee-ai/trinity-large-preview:free400B MoE, 128k context, good for agentic tasks
kilo/minimax/minimax-m2.5:freeBalanced capability
kilo/x-ai/grok-code-fast-1:optimized:freeFast, code-focused
kilo/stepfun/step-3.5-flash:freeLightweight, fast

Launch with a specific model:

kilo -m kilo/arcee-ai/trinity-large-preview:free

5. Useful Commands Reference

kilo                        # launch interactive TUI
kilo run "<task>"           # run a one-off task
kilo models                 # list all available models
kilo models --verbose       # list with cost and context metadata
kilo session list           # list past sessions
kilo export <session-id>    # export session as JSON
kilo auth login             # log in to Kilo platform
kilo auth list              # show stored credentials
kilo auth logout            # log out
kilo mcp                    # manage MCP (Model Context Protocol) servers
kilo upgrade                # upgrade to the latest version
kilo stats                  # show token usage and cost statistics
kilo uninstall              # uninstall kilo and remove config files

6. Uninstall

Kilo’s built-in uninstall command removes the binary, config, and local data:

kilo uninstall

Then remove the npm package:

npm uninstall -g @kilocode/cli --prefix ~/.local

Remove leftover data directories:

rm -rf ~/.local/share/kilo

Verify nothing remains:

which kilo    # should return nothing