Skip to main content
Clients & tools

Kilo CLI

AI coding in terminal

Kilo CLI brings AI-powered coding assistance directly to your terminal. Connect it to Qwen Cloud's pay-as-you-go API to generate, edit, and refactor code without leaving the command line.

Quick start

Get running in a few minutes:
# 1. Install
npm install -g @kilocode/cli
kilo --version

# 2. Configure: Edit ~/.config/kilo/config.json
# Add provider configuration with your API key

# 3. Test (run kilo and type)
kilo
Ask: "Write a function to calculate fibonacci numbers"
You should see: Kilo generates the fibonacci function code

Configuration

Basic setup

Configure Kilo CLI to use Qwen Cloud:
  • API endpoint: https://dashscope-intl.aliyuncs.com/apps/anthropic/v1
  • Authentication: API key required
  • Model selection: Any Qwen model ID
Free quota and billing:
  • First-time users get a free quota (valid for 90 days)
  • Enable Free quota only to prevent unexpected charges
For Coding Plan users: Use your exclusive base URL and API key instead. See Coding Plan for Kilo CLI.

Step-by-step configuration

1

Install Kilo CLI

npm install -g @kilocode/cli
Verify with kilo --version
2

Configure provider

Edit the configuration file:
vim ~/.config/kilo/config.json
Copy and paste the following configuration:
{
  "$schema": "https://kilo.ai/config.json",
  "provider": {
    "qwencloud": {
      "npm": "@ai-sdk/anthropic",
      "name": "QwenCloud",
      "options": {
        "baseURL": "https://dashscope-intl.aliyuncs.com/apps/anthropic/v1",
        "apiKey": "<your-api-key>"
      },
      "models": {
        "qwen3-max-2026-01-23": {
          "name": "qwen3-max-2026-01-23",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 1024
            }
          }
        },
        "qwen3-coder-plus": {
          "name": "qwen3-coder-plus"
        }
      }
    }
  }
}
Replace <your-api-key> with your API key. Save the file and restart Kilo CLI.
3

Start coding

kilo
Type your coding requests in the chat interface

Model recommendations

TaskModelWhy
Simple tasksqwen3-coder-plusFast responses, low cost
Standard codingqwen3-coder-plusBalanced performance
Complex algorithmsqwen3-max-2026-01-23Strong reasoning
Architecture designqwen3-max-2026-01-23Deep code understanding

Limitations

  • Terminal only: No GUI interface
  • Token usage: Multi-file edits consume more tokens
  • Model compatibility: Not all features work with all models

Troubleshooting

"Invalid API key" error
Solution:
  • Verify API key is correct
  • Ensure API key has quota
"Model not found" error
Solution:
High token consumption
Solution:
  • Work in specific directories
  • Use precise prompts
  • Clear context with new sessions
  • Choose appropriate models for tasks
Slow responses
Solution:
  • Use faster models like qwen3-coder-next
  • Check network connection
  • Reduce context size

Token optimization

Reduce usage by:
  1. Focused directories: Navigate to specific project folders
  2. Clear prompts: Be specific about what you need
  3. Model selection: Use lightweight models for simple tasks
  4. Context management: Start new sessions for unrelated tasks
  5. Incremental changes: Make small, focused edits