MoonshotAI/kimi-cli
Kimi Code CLI
Kimi Code | Documentation | 文档
Kimi Code CLI is an AI agent that runs in the terminal, helping you complete software development tasks and terminal operations. It can read and edit code, execute shell commands, search and fetch web pages, and autonomously plan and adjust actions during execution.
Getting Started
See Getting Started for how to install and start using Kimi Code CLI.
Key Features
Shell command mode
Kimi Code CLI is not only a coding agent, but also a shell. You can switch the shell command mode by pressing Ctrl-X. In this mode, you can directly run shell commands without leaving Kimi Code CLI.
[!NOTE] Built-in shell commands like
cdare not supported yet.
VS Code extension
Kimi Code CLI can be integrated with Visual Studio Code via the Kimi Code VS Code Extension.
IDE integration via ACP
Kimi Code CLI supports Agent Client Protocol out of the box. You can use it together with any ACP-compatible editor or IDE.
To use Kimi Code CLI with ACP clients, make sure to run Kimi Code CLI in the terminal and send /login to complete the login first. Then, you can configure your ACP client to start Kimi Code CLI as an ACP agent server with command kimi acp.
For example, to use Kimi Code CLI with Zed or JetBrains, add the following configuration to your ~/.config/zed/settings.json or ~/.jetbrains/acp.json file:
|
|
Then you can create Kimi Code CLI threads in IDE’s agent panel.
Zsh integration
You can use Kimi Code CLI together with Zsh, to empower your shell experience with AI agent capabilities.
Install the zsh-kimi-cli plugin via:
|
|
[!NOTE] If you are using a plugin manager other than Oh My Zsh, you may need to refer to the plugin’s README for installation instructions.
Then add kimi-cli to your Zsh plugin list in ~/.zshrc:
|
|
After restarting Zsh, you can switch to agent mode by pressing Ctrl-X.
MCP support
Kimi Code CLI supports MCP (Model Context Protocol) tools.
kimi mcp sub-command group
You can manage MCP servers with kimi mcp sub-command group. For example:
|
|
Ad-hoc MCP configuration
Kimi Code CLI also supports ad-hoc MCP server configuration via CLI option.
Given an MCP config file in the well-known MCP config format like the following:
|
|
Run kimi with --mcp-config-file option to connect to the specified MCP servers:
|
|
More
See more features in the Documentation.
Development
To develop Kimi Code CLI, run:
|
|
Then you can start working on Kimi Code CLI.
Refer to the following commands after you make changes:
|
|
Note: make build and make build-bin automatically run make build-web to embed the web UI.