Files
Agent-Tools/adapters/tools/kimi.yaml
T
总工 a2fd5e369b Wave 2.1: 返工黑屏/安装进度/官方配置三层/文档深度/真机列表
老板实测 5 条修复:DiagTab Hooks 黑屏、安装三阶段进度、配置按官方字段三层分组、FR-09 中文文档、detectCliAll 接入列表页。
2026-08-25 11:57:10 +08:00

171 lines
5.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# AgentDock 适配器 · Kimi CLI(月之暗面 Moonshot)(Wave 2.1
# 数据依据:调研底稿 agent-cli-survey-2026-08-24.mdKimi 章节)+ 架构 §3.3
# 铁律:只走官方 code.kimi.com 脚本 / PyPI kimi-cli,严禁 npm(仿名包)。
# ============================================================
id: kimi
name: Kimi CLI
name_zh: Kimi CLI
vendor: 月之暗面
status: available
adapter_version: 1.1.0
license: Apache-2.0
platforms:
windows:
architectures: [x64]
notes: 原生支持(PowerShell 脚本安装,非 WSL
linux:
distributions: [ubuntu]
architectures: [x64]
official:
homepage: https://github.com/MoonshotAI/kimi-cli
docs: https://moonshotai.github.io/kimi-cli/en/guides/getting-started.html
allowed_hosts: [code.kimi.com, pypi.org, github.com]
runtime_deps:
- id: uv
semver_range: ">=0"
required_for: [install]
- id: python
semver_range: ">=3.12"
required_for: [run]
install:
preferred: pypi_uv
channels:
- id: pypi_uv
platforms: [windows, linux]
command: [uv, tool, install, kimi-cli]
package: kimi-cli
elevate: never
post_checks: [detect]
- id: official_script
platforms: [windows]
script:
url: https://code.kimi.com/install.ps1
kind: powershell_irm
elevate: never
post_checks: [detect]
- id: official_script
platforms: [linux]
script:
url: https://code.kimi.com/install.sh
kind: bash_pipe
elevate: never
post_checks: [detect]
detect:
executable: kimi
version_args: ["--version"]
update:
method: pypi_upgrade
command: [uv, tool, upgrade, kimi-cli]
uninstall:
method: package_manager
command: [uv, tool, uninstall, kimi-cli]
keep_config_default: true
authorization:
modes:
- mode: browser_oauth
command: [kimi, login]
notes_zh: Kimi Code 浏览器 OAuth(推荐)
- mode: api_key
env_keys: [KIMI_API_KEY]
notes_zh: Moonshot 开放平台 API Key
# 配置机制(调研底稿 Kimi 章节):~/.kimi/config.tomlTOML,兼容 JSON
# 可配 default_model、providerstype/base_url/api_key)、models 等;
# 环境变量:KIMI_API_KEY / KIMI_BASE_URL / KIMI_MODEL_NAME / KIMI_MODEL_TEMPERATURE。
configuration:
files:
- path: "~/.kimi/config.toml"
format: toml
scope: user
environment:
- key: KIMI_API_KEY
sensitive: true
maps_to_field: api_key
fields:
- id: default_model
label_zh: 默认模型
group: common
help_zh: 官方键 default_modelKimi CLI 使用的默认模型
required: false
sensitive: false
type: string
storage: file
docs_url: https://moonshotai.github.io/kimi-cli/en/configuration/config-files.html
- id: env.KIMI_BASE_URL
label_zh: Base URL
group: advanced
help_zh: 官方环境变量 KIMI_BASE_URL(自定义 OpenAI 兼容端点);写入 config.toml 的 env 表,若需进程级生效请以官方 env-vars 文档为准
required: false
sensitive: false
type: url
storage: file
docs_url: https://moonshotai.github.io/kimi-cli/en/configuration/env-vars.html
- id: api_key
label_zh: API Key
group: auth
help_zh: 存入系统密钥库(对应环境变量 KIMI_API_KEYMoonshot 开放平台获取)
required: false
sensitive: true
type: string
storage: keyring
docs_url: https://moonshotai.github.io/kimi-cli/en/configuration/env-vars.html
diagnostics:
- rule_id: path.not_installed
- rule_id: path.not_in_path
- rule_id: dependency.uv
- rule_id: dependency.python_below_min
- rule_id: version_conflict.multiple_copies
- rule_id: config.corrupt
documentation:
quickstart_zh: 安装后运行 `kimi login` 登录,或用 `kimi -p "提示词"` 无头执行。
install_zh: 只走官方渠道:`uv tool install kimi-cli`(本适配器默认)或官方脚本 code.kimi.com/install.shinstall.ps1)。脚本会自动装 uv 并从 PyPI kimi-cli 安装。严禁 npmnpm 上的 kimi-code 是第三方仿名包)。
auth_zh: ① Kimi Code 浏览器 OAuth(推荐,`kimi login`);② Moonshot 开放平台 API Keyplatform 侧获取后粘贴,经 KIMI_API_KEY 注入)。`kimi logout` 清除 OAuth 凭据。
commands:
- cmd: kimi
desc_zh: 启动交互式会话
- cmd: kimi login
desc_zh: 登录(浏览器 OAuth 或 API Key
- cmd: kimi logout
desc_zh: 清除 OAuth 凭据
- cmd: kimi -p "提示词"
desc_zh: 无头单次执行
- cmd: kimi --output-format stream-json -p "提示词"
desc_zh: print 模式 JSON 流输出
- cmd: kimi --quiet
desc_zh: 静默模式
- cmd: kimi --version
desc_zh: 显示版本号
- cmd: kimi info
desc_zh: 显示版本与协议信息
- cmd: kimi acp
desc_zh: IDE 集成 stdioACP 协议)
params:
- param: -p / --prompt
desc_zh: 处理后退出(无头模式)
- param: --print
desc_zh: 打印模式
- param: --output-format
desc_zh: 输出格式(如 stream-json
- param: --quiet
desc_zh: 静默模式
- param: --afk
desc_zh: 离键模式
- param: --config-file
desc_zh: 指定配置文件路径
updated_at: "2026-08-25"
risks_zh:
- 严禁 npmnpm 上的 kimi-code 是第三方仿名包,与月之暗面无关
- 官方脚本会自动安装 uv 并从 PyPI kimi-cli 安装(Python 3.123.14
- providers 表(type/base_url/api_key 多 provider)等高级配置本表单不覆盖,以官方 config-files 文档为准