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.
Get running in a few minutes:
You should see: Kilo generates the fibonacci function code
Configure Kilo CLI to use Qwen Cloud:
Verify with Type your coding requests in the chat interface
"Invalid API key" error
Reduce usage by:
Quick start
Get running in a few minutes:
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
kilo --version2
Configure provider
Edit the configuration file:Copy and paste the following configuration:Replace
<your-api-key> with your API key. Save the file and restart Kilo CLI.3
Start coding
Model recommendations
| Task | Model | Why |
|---|---|---|
| Simple tasks | qwen3-coder-plus | Fast responses, low cost |
| Standard coding | qwen3-coder-plus | Balanced performance |
| Complex algorithms | qwen3-max-2026-01-23 | Strong reasoning |
| Architecture design | qwen3-max-2026-01-23 | Deep 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:"Model not found" error
- Verify API key is correct
- Ensure API key has quota
Solution:High token consumption
- Check model ID spelling
- See Model list
Solution:Slow responses
- Work in specific directories
- Use precise prompts
- Clear context with new sessions
- Choose appropriate models for tasks
Solution:
- Use faster models like
qwen3-coder-next- Check network connection
- Reduce context size
Token optimization
Reduce usage by:
- Focused directories: Navigate to specific project folders
- Clear prompts: Be specific about what you need
- Model selection: Use lightweight models for simple tasks
- Context management: Start new sessions for unrelated tasks
- Incremental changes: Make small, focused edits
Related resources
- Coding Plan: Setup with subscription →
- Models: Available models →
- API docs: Anthropic-compatible reference →
- Official docs: Kilo CLI documentation →