Skip to main content

Kimi CLI

Commit Activity Checks Version Downloads Ask DeepWiki

Kimi Code | Documentation | 文档

[!IMPORTANT] Kimi CLI is evolving into Kimi Code CLI — the next-generation terminal AI agent from the same team. Installing Kimi Code CLI automatically migrates your configuration and sessions. This project will be gradually wound down; the docs and existing installations remain available.

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.

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

VS Code extension

Kimi CLI can be integrated with Visual Studio Code via the Kimi Code VS Code Extension.

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

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

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kimi-cli 1.50.0
File Size Uploaded
kimi_cli-1.50.0.tar.gz 5.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for kimi-cli 1.50.0
File Interpreter ABI Platform
kimi_cli-1.50.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 MB

Release files / kimi_cli-1.50.0.tar.gz

Download URL kimi_cli-1.50.0.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d2a0b5ba4489215cc27f09820d6d9eec19d24a4fad3823758d503a887ec38f38
BLAKE2b-256 checksum
How to use checksums
963a1013a733e39e4bd0bf16d3c276b4cee69aebb9037c24a55599e5c4705068
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.50.0-py3-none-any.whl

Download URL kimi_cli-1.50.0-py3-none-any.whl
Size 5.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0341d283a3d5233128c1634c8201820a91cc09a1eaefc1d5075c481131b0b7e7
BLAKE2b-256 checksum
How to use checksums
0d2c0ff0093a9473bca01cecd2ecc24fc8ded1d10024d76c7c5195c19122ed37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.52.0

2 release files

1.51.0

2 release files

This release

1.50.0 This release

2 release files

1.49.0

2 release files

1.48.0

2 release files

1.46.0

2 release files

1.45.0

2 release files

1.44.0

2 release files

1.43.0

2 release files

1.42.0

2 release files

1.41.0

2 release files

1.40.0

2 release files

1.39.0

2 release files

1.38.0

2 release files

1.37.0

2 release files

1.36.0

2 release files

1.35.0

2 release files

1.34.0

2 release files

1.33.0

2 release files

1.32.0

2 release files

1.31.0

2 release files

1.28.0

2 release files

1.27.0

2 release files

1.26.0

2 release files

1.25.0

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.20.0

2 release files

1.19.0

2 release files

1.16.0

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.88

2 release files

0.87

2 release files

0.86

2 release files

0.85

2 release files

0.84

2 release files

0.83

2 release files

0.82

2 release files

0.81

2 release files

0.80

2 release files

0.79

2 release files

0.78

2 release files

0.77

2 release files

0.76

2 release files

0.75

2 release files

0.74

2 release files

0.73

2 release files

0.72

2 release files

0.71

2 release files

0.70

2 release files

0.69

2 release files

0.68

2 release files

0.67

2 release files

0.66

2 release files

0.65

2 release files

0.64

2 release files

0.63

2 release files

0.62

2 release files

0.61

2 release files

0.60

2 release files

0.59

2 release files

0.58

2 release files

0.57

2 release files

0.56

2 release files

0.55

2 release files

0.54

2 release files

0.53

2 release files

0.52

2 release files

0.51

2 release files

0.50

2 release files

0.49

2 release files

0.48

2 release files

0.47

2 release files

0.46

2 release files

0.45

2 release files

0.44

2 release files

0.43

2 release files

0.42

2 release files

0.41

2 release files

0.40

2 release files

0.39

2 release files

0.38

2 release files

0.37

2 release files

0.36

2 release files

0.35

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page