Skip to main content
More tools

Kilo CLI

AI coding in terminal

Kilo CLI brings AI-powered coding assistance directly to your terminal. Connect it to QwenCloud via Token Plan (Individual), Token Plan (Team Edition), or pay-as-you-go billing.
When using qwen4-max-preview, the default output limit is 32000; to allow longer output, set KILO_EXPERIMENTAL_OUTPUT_TOKEN_MAX. Changing limit.output alone does not raise the limit.
When using qwen4-max, the default single-request output limit is 32000. To allow longer output, set KILO_EXPERIMENTAL_OUTPUT_TOKEN_MAX; changing only limit.output does not raise the limit. qwen4-max has a 1M-token context. The maximum output is 131,072 tokens in non-thinking mode and 262,144 tokens for thinking and the final answer combined. The defaults are reasoning_effort=high and thinking_budget=131072.

Quick start

1

Start Kilo CLI

kilo
2

Connect the provider

Enter /connect, select the provider for your billing plan, and enter the API key:
  • Token Plan (Individual): select Alibaba Token Plan (China) and enter the Token Plan (Individual) API Key.
  • Token Plan (Team Edition): select Alibaba Token Plan (China), assign a seat, and enter the Token Plan (Team Edition) API Key.
  • Pay-as-you-go: select Alibaba (China) and enter your QwenCloud API Key.
3

Select a model

Enter /models and select the model you want.
4

Verify

kilo run "Hello"

Configure with a configuration file

In addition to the options above, you can also connect using a configuration file.
  • macOS / Linux: ~/.config/kilo/config.json
  • Windows: C:\Users\<username>\.config\kilo\config.json
Replace YOUR_API_KEY with the API key for your plan and add the configuration to config.json.
Free quota and billing:

Token Plan (Individual)

Replace YOUR_API_KEY with the Token Plan (Individual) dedicated API Key. For available models, see Token Plan (Individual) supported models.
{
  "$schema": "https://kilo.ai/config.json",
  "provider": {
    "qwencloud-token-plan-personal": {
      "npm": "@ai-sdk/anthropic",
      "name": "QwenCloud",
      "options": {
        "baseURL": "https://token-plan.maas.qwencloudapi.com/apps/anthropic/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "auto": {
          "name": "Auto",
          "modalities": {
            "input": ["text"],
            "output": ["text"]
          }
        },
        "qwen4-max": {
          "name": "Qwen4 Max",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        },
        "qwen4-max-preview": {
          "name": "Qwen4 Max Preview",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        },
        "qwen3.8-max": {
          "name": "Qwen3.8 Max",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 262144
            }
          }
        },
        "qwen3.8-flash": {
          "name": "Qwen3.8 Flash",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 262144
            }
          }
        },
        "qwen3.7-max": {
          "name": "Qwen3.7 Max",
          "modalities": {
            "input": ["text"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "qwen3.7-plus": {
          "name": "Qwen3.7 Plus",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "qwen3.6-flash": {
          "name": "Qwen3.6 Flash",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "glm-5.3": {
          "name": "GLM-5.3",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "glm-5.2": {
          "name": "GLM-5.2",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "deepseek-v4-pro": {
          "name": "DeepSeek V4 Pro"
        },
        "deepseek-v4-pro-0813": {
          "name": "DeepSeek V4 Pro 0813"
        },
        "deepseek-v4-flash-0731": {
          "name": "DeepSeek V4 Flash 0731"
        },
        "deepseek-v4.1-flash": {
          "name": "DeepSeek V4.1 Flash"
        },
        "deepseek-v4.1-flash-1017": {
          "name": "DeepSeek V4.1 Flash 1017"
        }
      }
    }
  }
}
qwen3.8-max thinking mode:
  • thinking: Supports both enabled and disabled (hybrid thinking mode).
  • temperature: Defaults to 0.6 in thinking mode. Values below 0.6 are automatically adjusted to 0.6.
  • reasoning_effort: Controls reasoning depth. Options: xhigh, medium, low. Default: xhigh.

Token Plan (Team Edition)

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": {
    "qwencloud-token-plan": {
      "npm": "@ai-sdk/anthropic",
      "name": "QwenCloud",
      "options": {
        "baseURL": "https://token-plan.maas.qwencloudapi.com/apps/anthropic/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "auto": {
          "name": "Auto",
          "modalities": {
            "input": ["text"],
            "output": ["text"]
          }
        },
        "qwen4-max": {
          "name": "Qwen4 Max",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        },
        "qwen4-max-preview": {
          "name": "Qwen4 Max Preview",
          "modalities": {
            "input": [
              "text",
              "image"
            ],
            "output": [
              "text"
            ]
          }
        },
        "qwen3.8-max": {
          "name": "Qwen3.8 Max",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 262144
            }
          }
        },
        "qwen3.8-flash": {
          "name": "Qwen3.8 Flash",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 262144
            }
          }
        },
        "qwen3.7-max": {
          "name": "Qwen3.7 Max",
          "modalities": {
            "input": ["text"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "qwen3.7-plus": {
          "name": "Qwen3.7 Plus",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "qwen3.6-plus": {
          "name": "Qwen3.6 Plus",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "qwen3.6-flash": {
          "name": "Qwen3.6 Flash",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "deepseek-v4-pro": {
          "name": "DeepSeek V4 Pro"
        },
        "deepseek-v4-pro-0813": {
          "name": "DeepSeek V4 Pro 0813"
        },
        "deepseek-v4-flash-0731": {
          "name": "DeepSeek V4 Flash 0731"
        },
        "deepseek-v4.1-flash": {
          "name": "DeepSeek V4.1 Flash"
        },
        "deepseek-v4.1-flash-1017": {
          "name": "DeepSeek V4.1 Flash 1017"
        },
        "kimi-k2.7-code": {
          "name": "Kimi K2.7 Code",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "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.3": {
          "name": "GLM-5.3",
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 8192
            }
          }
        },
        "glm-5.2": {
          "name": "GLM-5.2",
          "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"
        }
      }
    }
  }
}
qwen3.8-max thinking mode:
  • thinking: Supports both enabled and disabled (hybrid thinking mode).
  • temperature: Defaults to 0.6 in thinking mode. Values below 0.6 are automatically adjusted to 0.6.
  • reasoning_effort: Controls reasoning depth. Options: xhigh, medium, low. Default: xhigh.

Pay-as-you-go

Replace YOUR_API_KEY with your QwenCloud API Key. For available models, see supported models. The following uses the Singapore (ap-southeast-1) endpoint. For another region, replace ap-southeast-1 and use an API key from that region. See Regions and endpoints.
{
  "$schema": "https://kilo.ai/config.json",
  "provider": {
    "qwencloud": {
      "npm": "@ai-sdk/anthropic",
      "name": "QwenCloud",
      "options": {
        "baseURL": "https://ap-southeast-1.maas.qwencloudapi.com/apps/anthropic/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "qwen3.8-max": {
          "name": "Qwen3.8 Max",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        },
        "qwen3.7-plus": {
          "name": "Qwen3.7 Plus",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        },
        "qwen3.8-flash": {
          "name": "Qwen3.8 Flash",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        },
        "deepseek-v4-pro-0813": {
          "name": "DeepSeek V4 Pro 0813",
          "modalities": {
            "input": ["text"],
            "output": ["text"]
          }
        },
        "deepseek-v4.1-flash": {
          "name": "DeepSeek V4.1 Flash",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        }
      }
    }
  }
}
To add more models, append them in the same format within models.

Verify configuration

After saving the configuration, restart Kilo CLI, type /models, search for "QwenCloud", and select the model you want to use. 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 your billing plan:

The model I need is not in the list

Add the model ID to models in config.json in the same format, save the file, and reopen Kilo CLI. For supported models, see the supported model list for your billing plan.

Requests return 401 Unauthorized

The API Key does not match the Base URL, or the key belongs to another billing plan. Confirm that the key type matches baseURL in the configuration, then save the configuration again.