Kimi Code CLI | Migration Guide | 迁移指南 | Legacy Docs
[!CAUTION] This project has been archived and is no longer maintained. Kimi CLI (Python) has been replaced by Kimi Code CLI, the next-generation terminal AI agent from the same team.
- This repository is read-only. There will be no further releases, bug fixes, or security updates.
- Existing installations are no longer supported and will stop working. Please migrate as soon as possible.
- Please file issues, feature requests, and security reports for Kimi Code CLI at MoonshotAI/kimi-code.
本项目已归档,不再维护。Python 版 Kimi CLI 已由 Kimi Code CLI 取代,旧版将无法继续使用,请参考 迁移指南 尽快升级。
sh
# macOS / Linux
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
powershell
# Windows (PowerShell)
irm https://code.kimi.com/kimi-code/install.ps1 | iex
Also available via Homebrew (brew install kimi-code) and npm (npm install -g @moonshot-ai/kimi-code).
kimi. On first launch, it detects your Kimi CLI data in ~/.kimi/ and offers to migrate your config, MCP servers, input history, and sessions. You can also run kimi migrate at any time. Your original data in ~/.kimi/ is never modified or deleted./login again, and re-authorize your MCP servers. Login credentials, MCP authorizations, and Kimi CLI plugins are not migrated.uv tool uninstall kimi-cli or brew uninstall kimi-cli.See the full migration guide for details.
All packages below are archived together with this repository. Published versions remain on PyPI, but will not receive any further updates.
| Package | Status |
|---|---|
kimi-cli |
Archived. Replaced by Kimi Code CLI |
kimi-code on PyPI |
Archived. A legacy alias of kimi-cli, not the new Kimi Code CLI |
kosong |
Archived |
pykaos |
Archived |
kimi-sdk |
Archived |
The source code remains available under the Apache License 2.0.
Thank you to everyone who used Kimi CLI, reported issues, and contributed code. Your feedback shaped Kimi Code CLI.
{
"agent_servers": {
"Kimi CLI": {
"type": "custom",
"command": "kimi",
"args": ["acp"],
"env": {}
}
}
}
Then you can create Kimi CLI threads in IDE's agent panel.

### Zsh integration
You can use Kimi CLI together with Zsh, to empower your shell experience with AI agent capabilities.
Install the [zsh-kimi-cli](https://github.com/MoonshotAI/zsh-kimi-cli) plugin via:
git clone https://github.com/MoonshotAI/zsh-kimi-cli.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kimi-cli
> [!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`:
plugins=(... kimi-cli)
After restarting Zsh, you can switch to agent mode by pressing `Ctrl-X`.
### MCP support
Kimi 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:
# Add streamable HTTP server:
kimi mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: ctx7sk-your-key"
# Add streamable HTTP server with OAuth authorization:
kimi mcp add --transport http --auth oauth linear https://mcp.linear.app/mcp
# Add stdio server:
kimi mcp add --transport stdio chrome-devtools -- npx chrome-devtools-mcp@latest
# List added MCP servers:
kimi mcp list
# Remove an MCP server:
kimi mcp remove chrome-devtools
# Authorize an MCP server:
kimi mcp auth linear
**Ad-hoc MCP configuration**
Kimi 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:
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
},
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}
Run `kimi` with `--mcp-config-file` option to connect to the specified MCP servers:
kimi --mcp-config-file /path/to/mcp.json
### More
See more features in the [Documentation](https://moonshotai.github.io/kimi-cli/en/).
## Development
To develop Kimi CLI, run:
git clone https://github.com/MoonshotAI/kimi-cli.git
cd kimi-cli
make prepare # prepare the development environment
Then you can start working on Kimi CLI.
Refer to the following commands after you make changes:
uv run kimi # run Kimi CLI
make format # format code
make check # run linting and type checking
make test # run tests
make test-kimi-cli # run Kimi CLI tests only
make test-kosong # run kosong tests only
make test-pykaos # run pykaos tests only
make build-web # build the web UI and sync it into the package (requires Node.js/npm)
make build # build python packages
make build-bin # build standalone binary
make help # show all make targets
Note: `make build` and `make build-bin` automatically run `make build-web` to embed the web UI.
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|