> ## Documentation Index
> Fetch the complete documentation index at: https://platform.kimi.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Kimi CLI to Call Kimi Model

[Kimi CLI](https://github.com/MoonshotAI/kimi-cli) is a new CLI agent that can help you with your software development tasks and terminal operations.

> **IMPORTANT** Kimi CLI is currently in technical preview.

## Key features

* Shell-like UI and raw shell command execution
* Zsh integration
* [Agent Client Protocol]
  support
* MCP support
* And more to come...

[Agent Client Protocol]: https://github.com/agentclientprotocol/agent-client-protocol

## Installation

> **IMPORTANT** Kimi CLI currently only supports macOS and Linux. Windows support is coming soon.

Kimi CLI is published as a Python package on PyPI. We highly recommend installing it with [uv](https://docs.astral.sh/uv/). If you have not installed uv yet, please follow the instructions [here](https://docs.astral.sh/uv/getting-started/installation/) to install it first.

Once uv is installed, you can install Kimi CLI with:

```sh theme={null}
uv tool install --python 3.13 kimi-cli
```

Run `kimi --help` to check if Kimi CLI is installed successfully.

> **IMPORTANT** Due to the security checks on macOS, the first time you run `kimi` command may take 10 seconds or more depending on your system environment.

## Upgrading

Upgrade Kimi CLI to the latest version with:

```sh theme={null}
uv tool upgrade kimi-cli --no-cache
```

## Usage

Run `kimi` command in the directory you want to work on, then send `/setup` to setup Kimi CLI:

<img src="https://mintcdn.com/moonshotai/dink2O4VJx7ks4ld/assets/pics/kimi-cli/setup.png?fit=max&auto=format&n=dink2O4VJx7ks4ld&q=85&s=43381f22fb841d185c58b706e5e4abe7" alt="" width="1588" height="1124" data-path="assets/pics/kimi-cli/setup.png" />

After setup, Kimi CLI will be ready to use. You can send `/help` to get more information.

## Features

### Shell mode

Kimi CLI is not only a coding agent, but also a shell. You can switch the mode by pressing `Ctrl-X`. In shell mode, you can directly run shell commands without leaving Kimi CLI.

> **NOTE** Built-in shell commands like `cd` are not supported yet.

### 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:

```sh theme={null}
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`:

```sh theme={null}
plugins=(... kimi-cli)
```

After restarting Zsh, you can switch to agent mode by pressing `Ctrl-X`.

### ACP support

Kimi CLI supports [Agent Client Protocol]

out of the box. You can use it together with any ACP-compatible editor or IDE.

For example, to use Kimi CLI with [Zed](https://zed.dev/), add the following configuration to your `~/.config/zed/settings.json`:

```json theme={null}
{
  "agent_servers": {
    "Kimi CLI": {
      "command": "kimi",
      "args": ["--acp"],
      "env": {}
    }
  }
}
```

Then you can create Kimi CLI threads in Zed's agent panel.

### Using MCP tools

Kimi CLI supports the well-established MCP config convention. For example:

```json theme={null}
{
  "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:

```sh theme={null}
kimi --mcp-config-file /path/to/mcp.json
```

## Kimi CLI More Usage

Besides the above features, you can also use `kimi --help` to view more usage of Kimi CLI. Or visit the [Kimi CLI documentation](https://github.com/MoonshotAI/kimi-cli) for more information.

## Kimi Agent SDK

Kimi Agent SDK provides a programmatic interface to interact with the Kimi CLI, enabling you to:

* **Build custom applications** - Integrate Kimi Agent into your own tools and workflows
* **Automate tasks** - Script complex multi-turn conversations
* **Extend capabilities** - Register custom tools that the model can call
* **Handle approvals** - Programmatically respond to permission requests

Available SDKs:

* **Go** - [go](https://github.com/MoonshotAI/kimi-agent-sdk/tree/main/go)
* **Node.js** - [node/agent\_sdk](https://github.com/MoonshotAI/kimi-agent-sdk/tree/main/node/agent_sdk)
* **Python** - [python](https://github.com/MoonshotAI/kimi-agent-sdk/tree/main/python)

For detailed information, see [Kimi Agent SDK GitHub repository](https://github.com/MoonshotAI/kimi-agent-sdk).
