Kilo CLI is the command-line client for Kilo Code. It connects to Alibaba Cloud Model Studio via pay-as-you-go, Coding Plan, Token Plan Personal Edition, or Token Plan Team Edition.
Install Kilo CLI
- Install Node.js (v18.0 or later).
- Run the following command in the terminal to install Kilo CLI:
Configure Access Credentials
Open the configuration file ~/.config/kilo/config.json with a text editor and add the configuration for your selected plan:
- Token Plan Personal Edition: A personal subscription that deducts personal Credits based on token consumption.
- Token Plan Team Edition: Subscription per seat, with Credits deducted based on token consumption.
- Coding Plan: Fixed monthly subscription, metered by model invocation count.
- Pay-as-you-go: Postpaid based on actual usage.
Token Plan Personal Edition
You must first purchase a Token Plan Personal Edition package with an active subscription. You can purchase a package on the Token Plan Personal Edition page.
Replace YOUR_API_KEY with the Token Plan Personal Edition dedicated API Key. For available models, see Token Plan Personal Edition supported models.
Token Plan Team Edition
You must first purchase a Token Plan Team Edition package with an active subscription. You can purchase a package on the Token Plan Team Edition page.
Replace YOUR_API_KEY with the Token Plan Team Edition dedicated API Key. For available models, see Token Plan Team Edition supported models.
Coding Plan
Replace YOUR_API_KEY with the Coding Plan dedicated API Key. For available models, see Coding Plan supported models.
Pay-as-you-go
Replace YOUR_API_KEY with the Alibaba Cloud Model Studio API Key. For available models, see OpenAI compatible - Supported models.
Set baseURL according to the region. The API Key must correspond to the selected region, replace {WorkspaceId} in the URL with your actual Workspace ID:
- China North 2 (Beijing):
https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1 - Singapore:
https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 - US (Virginia):
https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/compatible-mode/v1
models.
Verify Configuration
After saving the configuration, restart Kilo CLI, type /models, search for Alibaba Cloud Model Studio, and select the model you want to use to start a conversation.
For more tips and common commands, see the Kilo Code official documentation.
FAQ
Error Codes
If you encounter errors during configuration, refer to the FAQ documentation for the corresponding billing plan:
- Pay-as-you-go: Anthropic API compatible - Error Codes
- Coding Plan: Coding Plan FAQ
- Token Plan Personal Edition: Token Plan Personal Edition FAQ
- Token Plan Team Edition: Token Plan Team Edition FAQ