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 via Token Plan (Team Edition), Coding Plan, or pay-as-you-go billing.

Quick start

Get running in a few minutes:
# 1. Install (requires Node.js v18+)
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

Open ~/.config/kilo/config.json with a text editor and add the configuration for your chosen plan.
Free quota and billing:
  • First-time users get a free quota (valid for 90 days)
  • Enable Free quota only to prevent unexpected charges

Token Plan (Team Edition)

You must first purchase a Token Plan (Team Edition) with an active subscription on the Token Plan page. Replace YOUR_API_KEY with the Token Plan (Team Edition) dedicated API Key. For available models, see Token Plan (Team Edition) supported models.
{
  "$schema": "https://kilo.ai/config.json",
  "provider": {
    "bailian-token-plan": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Qwen Cloud",
      "options": {
        "baseURL": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "qwen3.6-plus": {
          "name": "Qwen3.6 Plus",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "qwen3.6-flash": {
          "name": "Qwen3.6 Flash",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "deepseek-v4-pro": {
          "name": "DeepSeek V4 Pro"
        },
        "deepseek-v4-flash": {
          "name": "DeepSeek V4 Flash"
        },
        "deepseek-v3.2": {
          "name": "DeepSeek V3.2"
        },
        "kimi-k2.6": {
          "name": "Kimi K2.6",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "kimi-k2.5": {
          "name": "Kimi K2.5",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "glm-5.1": {
          "name": "GLM-5.1",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "glm-5": {
          "name": "GLM-5",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "MiniMax-M2.5": {
          "name": "MiniMax M2.5"
        }
      }
    }
  }
}

Coding Plan

Replace YOUR_API_KEY with the Coding Plan dedicated API Key. For available models, see Coding Plan supported models.
{
  "$schema": "https://kilo.ai/config.json",
  "provider": {
    "bailian-coding-plan": {
      "npm": "@ai-sdk/anthropic",
      "name": "Qwen Cloud",
      "options": {
        "baseURL": "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "qwen3.6-plus": {
          "name": "Qwen3.6 Plus",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 1024
            }
          }
        },
        "qwen3.5-plus": {
          "name": "Qwen3.5 Plus",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 1024
            }
          }
        },
        "qwen3-coder-next": {
          "name": "Qwen3 Coder Next"
        },
        "qwen3-coder-plus": {
          "name": "Qwen3 Coder Plus"
        },
        "MiniMax-M2.5": {
          "name": "MiniMax M2.5"
        },
        "glm-5": {
          "name": "GLM-5",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 1024
            }
          }
        }
      }
    }
  }
}

Pay-as-you-go

Replace YOUR_API_KEY with your Qwen Cloud API Key. For available models, see supported models.
{
  "$schema": "https://kilo.ai/config.json",
  "provider": {
    "qwencloud": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Qwen Cloud",
      "options": {
        "baseURL": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "qwen3.6-plus": {
          "name": "Qwen3.6 Plus",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 1024
            }
          }
        }
      }
    }
  }
}
To add more models, append them in the same format within models.

Model recommendations

TaskModelWhy
Simple tasksqwen3-coder-plusFast responses, low cost
Standard codingqwen3-coder-plusBalanced performance
Complex algorithmsqwen3.6-plusStrong reasoning
Architecture designqwen3.6-plusDeep code understanding

Verify configuration

After saving the configuration, restart Kilo CLI, type /models, search for "Qwen Cloud", and select the model you want to use. For more tips and common commands, see the Kilo Code official documentation.

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 and matches your plan
  • Ensure API key has quota or active subscription
"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

FAQ

If you encounter errors, refer to the FAQ documentation for the corresponding billing plan: