DEV Community

KALPESH
KALPESH

Posted on

Kilo CLI — Installation & Usage Guide

Terminal-based AI coding agent with access to 500+ models. Plan, write, debug, and refactor code without leaving your terminal.


Prerequisites

  • Node.js v18.0 or later
  • npm

Installation

# Install globally (recommended)
npm install -g @kilocode/cli

# Or run without installing
npx @kilocode/cli

# Verify
kilo --version
Enter fullscreen mode Exit fullscreen mode

Older CPUs (no AVX support): Download the -baseline binary from GitHub Releases for your platform instead.


First-Time Setup

kilo        # launch TUI
/connect    # add your API key interactively
Enter fullscreen mode Exit fullscreen mode

Or configure manually at ~/.config/kilo/config.json:

{
  "$schema": "https://app.kilo.ai/config.json",
  "provider": {
    "anthropic": {
      "apiKey": "YOUR_API_KEY"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Basic Usage

kilo                              # launch interactive TUI
kilo run "fix the login bug"      # one-shot prompt
kilo --help                       # show all options
Enter fullscreen mode Exit fullscreen mode

Key CLI Commands

Command Description
kilo Launch interactive TUI
kilo run [message] Run a prompt non-interactively
kilo upgrade Update to latest version
kilo uninstall Remove Kilo
kilo models List available models
kilo stats Show token usage & costs
kilo auth Manage providers & credentials
kilo session Manage sessions
kilo export Export session as JSON
kilo pr <number> Checkout a GitHub PR and run Kilo

Slash Commands (inside TUI)

Command Description
/connect Add a provider / API key
/models Switch AI model
/agents Switch agent mode
/new Start a new session
/sessions Resume a previous session
/compact Summarize the session
/undo / /redo Undo or redo a message
/export Export transcript
/themes Switch UI theme
/exit Quit

Agent Modes

Switch with /agents inside the TUI:

Mode Purpose
Architect Plan features before coding
Ask Ask questions about your codebase
Debug Trace and fix bugs
Orchestrator Run parallel multi-agent tasks
Custom Define your own agent

Update & Uninstall

kilo upgrade                    # update
npm uninstall -g @kilocode/cli  # uninstall
Enter fullscreen mode Exit fullscreen mode

Links


Top comments (0)