kimi-code README

The project's README from github.com/MoonshotAI/kimi-code. As one markdown file: README.md.

Kimi Code CLI

License Docs
Documentation · Issues · 中文

Demo of using Kimi Code

What is Kimi Code CLI

Kimi Code CLI is an AI coding agent that runs in your terminal — it can read and edit code, run shell commands, search files, fetch web pages, and choose the next step based on the feedback it receives. It works out of the box with Moonshot AI’s Kimi models and can also be configured to use other compatible providers.

Install

Install with the official script. No Node.js required.

curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
irm https://code.kimi.com/kimi-code/install.ps1 | iex

On Windows, install Git for Windows before first launch because Kimi Code CLI uses the bundled Git Bash as its shell environment. If Git Bash is installed in a custom location, set KIMI_SHELL_PATH to the absolute path of bash.exe.

Then, run it with a new shell session:

kimi --version

For npm install, upgrade, uninstall, see Getting Started.

Quick Start

Open a project and start the interactive UI:

cd your-project
kimi

On first launch, run /login inside Kimi Code CLI and choose either Kimi Code OAuth or a Moonshot AI Open Platform API key. After login, try your first task:

Take a look at this project and explain its main directories.

Key Features

Use it in your editor (ACP)

Kimi Code CLI speaks the Agent Client Protocol, so ACP-compatible editors and IDEs (Zed, JetBrains, …) can drive a session over stdio. Log in once, then point your editor at the kimi acp subcommand — no extra login needed.

For Zed, add this to ~/.config/zed/settings.json:

{
  "agent_servers": {
    "Kimi Code CLI": {
      "type": "custom",
      "command": "kimi",
      "args": ["acp"],
      "env": {}
    }
  }
}

Then open a new conversation in Zed's Agent panel. See Using in IDEs for JetBrains setup and troubleshooting, and the kimi acp reference for the full capability matrix.

Docs

Develop

Requirements: Node.js ≥ 24.15.0, pnpm 10.33.0.

git clone https://github.com/MoonshotAI/kimi-code.git
cd kimi-code
pnpm install
pnpm dev:cli    # run the CLI in dev mode
pnpm test       # run tests
pnpm typecheck  # TypeScript check
pnpm lint       # oxlint
pnpm build      # build all packages

See CONTRIBUTING.md for the full contribution guide.

Community

Acknowledgements

Our TUI is built on top of pi-tui. We thank the authors of pi-tui for their valuable work.

License

Released under the MIT License.

kimi-code (MoonshotAI/kimi-code)

Searching Database…

这是什么?Kimi Code CLI 是一个在终端里运行的 AI 编程代理,它可以读取和修改代码、运行 shell 命令、搜索文件、抓取网页,并根据收到的反馈决定下一步操作。开箱即用支持 Moonshot AI(月之暗面)的 Kimi 模型,也可以配置为使用其他兼容的服务商。
这是可以导入的库,还是独立应用?它是一个独立的终端应用,以单个可执行文件分发,而不是可以在代码中导入的库。它还提供 'acp' 子命令,让 Zed、JetBrains 等编辑器可以通过 Agent Client Protocol(代理客户端协议)驱动会话。
我该怎么把它跑起来?运行官方安装脚本(macOS/Linux 使用 shell 命令,Windows 使用 PowerShell),无需 Node.js。然后打开一个项目,运行 'kimi' 进入交互式 TUI,并使用 '/login' 通过 Kimi Code OAuth 或 Moonshot AI 开放平台 API 密钥进行身份验证。
安装前需要先装 Node.js 或 Git 吗?安装或运行 CLI 都不需要 Node.js,因为它以单个可执行文件的形式发布。不过在 Windows 上,首次启动前必须先安装 Git for Windows,因为 CLI 使用随附的 Git Bash 作为 shell 环境。
Windows 上安装时有什么需要注意的坑吗?如果 Git Bash 安装在非标准位置,你需要手动将环境变量 KIMISHELLPATH 设置为 bash.exe 的绝对路径,否则 CLI 找不到可用的 shell。
在 macOS、Linux 和 Windows 上使用体验一样吗?一样,安装脚本和 CLI 都支持 macOS、Linux 和 Windows。不过 Windows 需要先安装 Git for Windows,以提供 Git Bash shell 环境。
如果我把视频拖进聊天框会怎样?代理可以观看你拖入的屏幕录制或演示片段并据此行动,比如把参考片段转换成 LUT,把长视频剪成短视频,或把屏幕录制转换成可用的代码。
子代理是怎么工作的?Kimi Code CLI 可以在相互隔离的上下文中调度内置的 coder、explore 和 plan 子代理,让它们并行完成专注的任务,同时保持主对话的整洁。
不手动编辑 JSON 也能添加 MCP 服务器吗?可以,'/mcp-config' 命令让你通过对话的方式添加、编辑和认证 Model Context Protocol(模型上下文协议)服务器,无需手动修改配置文件。
能从任意 GitHub 仓库安装插件吗?可以,技能、MCP 服务器和数据源既可以从官方市场安装,也可以从任意 GitHub 仓库安装,并且在添加之前会先显示每次安装的信任级别。
Creator
MoonshotAI
Size
123.4 MB
Stars
7.9K
Age
4mo
Commits · 90 Days