182 lines
6.7 KiB
YAML
182 lines
6.7 KiB
YAML
# ============================================================
|
||
# AgentDock 适配器 · Kimi Code CLI(月之暗面 Moonshot)(Wave 3.1 换代)
|
||
# 换代依据:老板实测官方现行安装已切换至 kimi-code 线,本适配器弃用旧 kimi-cli(PyPI)线。
|
||
# 核对来源(当日官方页面为准,2026-08-25):
|
||
# - 仓库/README:https://github.com/MoonshotAI/kimi-code
|
||
# - 官方文档:https://moonshotai.github.io/kimi-code/en/
|
||
# - 配置:https://moonshotai.github.io/kimi-code/en/configuration/config-files.html
|
||
# - 数据位置:https://moonshotai.github.io/kimi-code/en/configuration/data-locations.html
|
||
# ============================================================
|
||
id: kimi
|
||
name: Kimi Code CLI
|
||
name_zh: Kimi Code CLI
|
||
vendor: 月之暗面
|
||
status: available
|
||
adapter_version: 1.2.0
|
||
license: MIT
|
||
|
||
platforms:
|
||
windows:
|
||
architectures: [x64]
|
||
notes: 原生支持(官方 PowerShell 脚本安装,需 Git for Windows 作 shell 环境)
|
||
linux:
|
||
distributions: [ubuntu]
|
||
architectures: [x64]
|
||
|
||
official:
|
||
homepage: https://github.com/MoonshotAI/kimi-code
|
||
docs: https://moonshotai.github.io/kimi-code/en/
|
||
allowed_hosts: [code.kimi.com, moonshotai.github.io, github.com, api.github.com, api.kimi.com, api.moonshot.cn]
|
||
|
||
runtime_deps:
|
||
- id: git
|
||
semver_range: ">=0"
|
||
required_for: [run]
|
||
|
||
install:
|
||
preferred: official_script
|
||
channels:
|
||
- id: official_script
|
||
platforms: [windows]
|
||
script:
|
||
url: https://code.kimi.com/kimi-code/install.ps1
|
||
kind: powershell_irm
|
||
elevate: never
|
||
post_checks: [detect]
|
||
- id: official_script
|
||
platforms: [linux]
|
||
script:
|
||
url: https://code.kimi.com/kimi-code/install.sh
|
||
kind: bash_pipe
|
||
elevate: never
|
||
post_checks: [detect]
|
||
|
||
detect:
|
||
executable: kimi
|
||
version_args: ["--version"]
|
||
|
||
update:
|
||
method: manual
|
||
command: []
|
||
source:
|
||
kind: github
|
||
repo: MoonshotAI/kimi-code
|
||
|
||
uninstall:
|
||
method: manual_delete
|
||
command: []
|
||
keep_config_default: true
|
||
|
||
authorization:
|
||
modes:
|
||
- mode: browser_oauth
|
||
command: [kimi]
|
||
notes_zh: 运行 kimi 后在界面输入 /login,选 Kimi Code OAuth(推荐)
|
||
- mode: api_key
|
||
notes_zh: Moonshot 开放平台 API Key(官方写入 config.toml providers;AgentDock 密钥存系统密钥库)
|
||
credential_files:
|
||
- "~/.kimi-code/credentials"
|
||
test:
|
||
url: https://api.moonshot.cn/v1/models
|
||
key_header: Authorization
|
||
bearer: true
|
||
|
||
# 配置机制(官方 config-files 文档):~/.kimi-code/config.toml(TOML,snake_case)
|
||
# 常用字段:default_model / default_permission_mode(manual|yolo|auto)/ default_plan_mode;
|
||
# providers 表(type/base_url/api_key)、models 表(模型别名)。默认模型别名必须定义在 models 表。
|
||
# 环境变量:KIMI_CODE_HOME(数据目录)、KIMI_MODEL_*(临时模型),密钥不自动从 shell 环境变量读取。
|
||
configuration:
|
||
files:
|
||
- path: "~/.kimi-code/config.toml"
|
||
format: toml
|
||
scope: user
|
||
environment: []
|
||
fields:
|
||
- id: default_model
|
||
label_zh: 默认模型
|
||
group: common
|
||
help_zh: 官方键 default_model(模型别名,须已在 models 表定义),如 kimi-code/k3
|
||
required: false
|
||
sensitive: false
|
||
type: string
|
||
storage: file
|
||
docs_url: https://moonshotai.github.io/kimi-code/en/configuration/config-files.html
|
||
- id: default_permission_mode
|
||
label_zh: 权限模式
|
||
group: advanced
|
||
help_zh: 官方键 default_permission_mode,新会话默认权限模式
|
||
required: false
|
||
sensitive: false
|
||
type: enum
|
||
storage: file
|
||
docs_url: https://moonshotai.github.io/kimi-code/en/configuration/config-files.html
|
||
options:
|
||
- value: manual
|
||
label_zh: 手动确认(每次询问)
|
||
- value: yolo
|
||
label_zh: 自动放行(可能仍会提问)
|
||
- value: auto
|
||
label_zh: 全自动(自主决定)
|
||
- id: api_key
|
||
label_zh: API Key
|
||
group: auth
|
||
help_zh: 存入系统密钥库(Moonshot 开放平台 API Key;官方也支持写入 config.toml providers.api_key,AgentDock 密钥不落明文)
|
||
required: false
|
||
sensitive: true
|
||
type: string
|
||
storage: keyring
|
||
docs_url: https://moonshotai.github.io/kimi-code/en/configuration/config-files.html
|
||
|
||
# 模型清单(官方 config-files 示例中 /login 预置的 managed:kimi-code 别名)
|
||
models:
|
||
list:
|
||
- id: kimi-code/k3
|
||
label_zh: K3(旗舰推理)
|
||
- id: kimi-code/kimi-for-coding
|
||
label_zh: Kimi for Coding(均衡)
|
||
- id: kimi-code/kimi-for-coding-highspeed
|
||
label_zh: Kimi for Coding 高速版
|
||
|
||
diagnostics:
|
||
- rule_id: path.not_installed
|
||
- rule_id: path.not_in_path
|
||
- rule_id: dependency.git
|
||
- rule_id: version_conflict.multiple_copies
|
||
- rule_id: config.corrupt
|
||
|
||
documentation:
|
||
quickstart_zh: 安装后运行 `kimi` 进入交互界面,首次启动输入 `/login` 选 Kimi Code OAuth 或 Moonshot API Key;也可 `kimi -p "提示词"` 无头执行。
|
||
install_zh: 只走官方脚本:Windows `irm https://code.kimi.com/kimi-code/install.ps1 | iex`,macOS/Linux `curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash`(单二进制发行,无需 Node.js)。Windows 首次启动前需装 Git for Windows(作 shell 环境)。
|
||
auth_zh: ① Kimi Code OAuth(推荐,TUI 内 /login);② Moonshot 开放平台 API Key。登录凭据存于 `~/.kimi-code/credentials/`,/logout 清除。
|
||
commands:
|
||
- cmd: kimi
|
||
desc_zh: 启动交互式会话(TUI)
|
||
- cmd: kimi -p "提示词"
|
||
desc_zh: 无头单次执行(print 模式)
|
||
- cmd: kimi --version
|
||
desc_zh: 显示版本号
|
||
- cmd: kimi acp
|
||
desc_zh: IDE 集成 stdio(ACP 协议)
|
||
- cmd: /login
|
||
desc_zh: 登录(Kimi Code OAuth 或 Moonshot API Key)
|
||
- cmd: /model
|
||
desc_zh: 切换模型
|
||
- cmd: /mcp-config
|
||
desc_zh: 配置 MCP 服务器
|
||
params:
|
||
- param: -p / --print
|
||
desc_zh: 无头模式,执行后退出
|
||
- param: --output-format
|
||
desc_zh: 输出格式(如 stream-json)
|
||
- param: -m / --model
|
||
desc_zh: 指定模型别名
|
||
- param: --quiet
|
||
desc_zh: 静默模式
|
||
- param: --session
|
||
desc_zh: 恢复指定会话
|
||
updated_at: "2026-08-25"
|
||
risks_zh:
|
||
- 已换代:旧 PyPI `kimi-cli` 线废止,官方现行安装为 kimi-code 脚本(本适配器 1.2.0 已改)
|
||
- 官方密钥不自动从 shell 环境变量读取,需写入 config.toml providers 表;AgentDock 密钥存系统密钥库(测试连通直连官方接口),OAuth 登录为推荐路径
|
||
- 模型别名与 providers/models 高级配置以官方 config-files 文档为准,本表单不覆盖
|