Kilo Code CLI 配置
它是基于 OpenCode,所以配置可以参考 OpenCode 文档。
配置文件:
~/.config/kilo/{config.json,opencode.json,opencode.jsonc}
~/.config/kilo/opencode.jsonc
{
"$schema": "https://app.kilo.ai/config.json",
// "model": "",
"provider": {
"newapi": {
"api": "https://newapi.cn/v1",
"name": "NewAPI Custom",
"env": [
"NEW_API_KEY"
],
"id": "newapi",
"npm": "@ai-sdk/openai-compatible",
"models": {
"iflow/glm-4.6": {
"id": ""iflow/glm-4.6,
"name": "glm-4.6",
"family": "iflow"
}
}
// "options": {
// "apiKey": "{env:NEWAPI_API_KEY}"
// "baseURL": "https://newapi.cn/v1"
// }
}
}
}
# 自定义配置文件
export OPENCODE_CONFIG=/path/to/my/custom-config.json
# 自定义配置文件夹
export OPENCODE_CONFIG_DIR=/path/to/my/config-directory
~/.config/opencode/opencode.json
凭据配置文件:
~/.local/share/kilo/auth.json
~/.local/share/opencode/auth.json
{
"kilo": {
"type": "oauth",
"access": "",
"refresh": "",
"expires": 1804173693665
}
}
模型文件(缓存,会被清理):~/.cache/kilo/models.json
jq 'del(.[] | .models?)' ~/.cache/kilo/models.json