Kimi CLI (Archived)
Kimi Code CLI | Migration Guide | 迁移指南 | Legacy Docs
Migrate to Kimi Code CLI
-
Install Kimi Code CLI:
# macOS / Linux curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
# 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). -
Open a new terminal and run
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 runkimi migrateat any time. Your original data in~/.kimi/is never modified or deleted. -
Run
/loginagain, and re-authorize your MCP servers. Login credentials, MCP authorizations, and Kimi CLI plugins are not migrated. -
Uninstall the legacy CLI after migrating, e.g.
uv tool uninstall kimi-cliorbrew uninstall kimi-cli.
See the full migration guide for details.
Packages in this repository
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 |
License
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.
Original README (legacy, for reference only)
Kimi 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 CLI.
Key Features
Shell command mode
Kimi 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 CLI.
VS Code extension
Kimi CLI can be integrated with Visual Studio Code via the Kimi Code VS Code Extension.
IDE integration via ACP
Kimi CLI supports Agent Client Protocol out of the box. You can use it together with any ACP-compatible editor or IDE.
To use Kimi CLI with ACP clients, make sure to run Kimi CLI in the terminal and send /login to complete the login first. Then, you can configure your ACP client to start Kimi CLI as an ACP agent server with command kimi acp.
For example, to use Kimi CLI with Zed or JetBrains, add the following configuration to your ~/.config/zed/settings.json or ~/.jetbrains/acp.json file:
{
"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 plugin via:
git clone https://github.com/MoonshotAI/zsh-kimi-cli.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kimi-cli
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.
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.
Release files for kimi-cli 1.52.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kimi_cli-1.52.0.tar.gz | 5.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kimi_cli-1.52.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 MB
Release files / kimi_cli-1.52.0.tar.gz
| Download URL | kimi_cli-1.52.0.tar.gz |
|---|---|
| Size | 5.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
765c520b95ee9831e72c335cd57e4f669489d2b871413b9948553cc7279562d5
|
|
BLAKE2b-256 checksum How to use checksums |
9db83d7790b306e77f284749d630ac2665382ab5a1c37dc1da1e4e27427df6e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / kimi_cli-1.52.0-py3-none-any.whl
| Download URL | kimi_cli-1.52.0-py3-none-any.whl |
|---|---|
| Size | 5.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7becbb9081e0c1194b481fe06087ceceaf12bad9f3798fcefc1e3dd2e80b90b2
|
|
BLAKE2b-256 checksum How to use checksums |
15b041b696c5e63699b41e9b833751c836cded8104cc6bfcb89ef600939ee92f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|