Skip to main content

Kimi Code is a CLI agent that lives in your terminal.

Project description

Kimi CLI

Commit Activity Checks Version Downloads Ask DeepWiki

Kimi Code | Documentation | 文档

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.

[!IMPORTANT] Kimi CLI is currently in technical preview.

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.

[!NOTE] Built-in shell commands like cd are not supported yet.

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 /setup to complete the setup 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": {
      "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

[!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.

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  # build python packages
make build-bin  # build standalone binary
make help  # show all make targets

Contributing

We welcome contributions to Kimi CLI! Please refer to CONTRIBUTING.md for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kimi_code-0.85.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kimi_code-0.85-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file kimi_code-0.85.tar.gz.

File metadata

  • Download URL: kimi_code-0.85.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kimi_code-0.85.tar.gz
Algorithm Hash digest
SHA256 f62a46d4ff69e5cac5d478bb2f34e9b1e35d28a2a8b9f0786a8c719f3772324d
MD5 94dfbc567d7ddee9837f2387c4bd5eab
BLAKE2b-256 77dbddbf5fe232bd53365740801020f03bf6e7234d4ee4056f198414d0f2e9eb

See more details on using hashes here.

File details

Details for the file kimi_code-0.85-py3-none-any.whl.

File metadata

  • Download URL: kimi_code-0.85-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kimi_code-0.85-py3-none-any.whl
Algorithm Hash digest
SHA256 716ca6b964a92faa85bea4d80374f3f223ae8a03133435a7ffe42bee7d6a09c2
MD5 78684631420f3becb39f06c2d14a168e
BLAKE2b-256 3ab5ca960612c4a0db0200a7b9561d8556738121ecf23d92cab6984115367614

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page