Skip to content

About

基于kimi-cli,加入了可以配置其他模型提供商的特性,对硅基流动的平台做了一些特别的兼容工作

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

519 Commits

Folders and files

Repository files navigation

Kimi CLI

Commit Activity Checks Version Downloads Ask DeepWiki

中文

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 shell command execution
  • Zsh integration
  • Agent Client Protocol support
  • MCP support
  • And more to come...

Installation

Kimi CLI is published as a Python package on PyPI. We highly recommend installing it with uv. If you have not installed uv yet, please follow the instructions here to install it first.

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

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:

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:

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

Configuration

Kimi CLI supports flexible configuration of API providers and models. You can manage multiple providers (OpenAI, Anthropic, Kimi, etc.) and switch between them easily.

Quick Configuration

Run the interactive setup wizard:

kimi config setup

Or manually configure providers and models:

# Add an API provider
kimi config provider add \
  --name my-openai \
  --type openai_legacy \
  --base-url https://api.openai.com/v1 \
  --api-key sk-...

# Add a model
kimi config model add \
  --name gpt-4 \
  --provider my-openai \
  --model-id gpt-4 \
  --max-context 128000

# Set as default
kimi config model set-default --name gpt-4

Environment Variables

Override configuration with environment variables:

# Provider-specific
export OPENAI_API_KEY="sk-..."
export OPENAI_BASE_URL="https://api.openai.com/v1"

# Or generic
export LLM_PROVIDER_API_KEY="sk-..."
export LLM_MODEL_NAME="gpt-4"

See CONFIG_README.md for detailed configuration guide.

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

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, add the following configuration to your ~/.config/zed/settings.json:

{
  "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:

{
  "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

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 help  # show all make targets

Contributing

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

About

基于kimi-cli,加入了可以配置其他模型提供商的特性,对硅基流动的平台做了一些特别的兼容工作

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages