Kimi Code CLI: Open-Source AI Coding Agent with Skills & MCP Support

Use Kimi Code CLI in the terminal, browser, or ACP-compatible editors with MCP, Agent Skills, plugins, multiple providers, and legacy Kimi CLI migration.

Kimi Code CLI is Moonshot AI’s open-source AI coding agent for working with software projects from the terminal. It can inspect a codebase, edit files, run shell commands, and carry out multi-step coding tasks from a project directory.

The coding agent also opens a local browser UI and works with ACP-compatible editors. MCP servers, Agent Skills, plugins, subagents, Plan mode, and configurable model providers extend how the agent works inside a project.

You can use it for codebase exploration, implementation, debugging, refactoring, and longer coding tasks that need project context, external tools, or reusable instructions.

Features

  • Reads and edits project files and runs shell commands with approval controls.
  • Runs in the terminal and opens a local browser UI with kimi web.
  • Connects to ACP-compatible editors through kimi acp.
  • Configures MCP servers and MCP OAuth from the terminal UI.
  • Loads Agent Skills from user, project, extra, and built-in directories.
  • Loads plugins that package Skills, agents, MCP servers, hooks, and slash commands.
  • Delegates focused work to built-in or custom subagents.
  • Includes Plan mode for exploration and Goal mode for persistent objectives.
  • Connects to Kimi, Anthropic, OpenAI, Gemini, and Vertex AI provider types.
  • Accepts image and video input when the selected model exposes those capabilities.

How to Use It

Installation

macOS and Linux

curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

Windows

Install Git for Windows before the first Kimi Code CLI launch. Kimi Code CLI uses the bundled Git Bash as its shell environment.

irm https://code.kimi.com/kimi-code/install.ps1 | iex

npm

npm installation requires Node.js 22.19.0 or later.

npm install -g @moonshot-ai/kimi-code

Start and authenticate

Verify the executable, open your project directory, and launch the TUI. Inside Kimi Code CLI, /login offers Kimi Code OAuth and Kimi Platform API key authentication. Use /init when the project needs an AGENTS.md instruction file.

kimi --version
cd your-project
kimi
/login
/init

Shell mode and browser UI

Type ! in an empty TUI input box to enter shell mode. Shell command output is added to the conversation context. Review permission prompts before approving file edits, shell commands, or network-facing actions. Run kimi web from a regular shell to open the browser UI.

kimi web

Update or uninstall

Use kimi upgrade to check for an available update. npm installations can be removed with the npm uninstall command.

kimi upgrade
npm uninstall -g @moonshot-ai/kimi-code

Migrate from the legacy Kimi CLI

Kimi Code CLI checks ~/.kimi/ on first launch and can offer a migration. Run kimi migrate at any time to start it manually. OAuth login credentials, MCP authorizations, and legacy Kimi CLI plugins are excluded, and the existing ~/.kimi/ data stays intact.

The migration can import:

  • config.toml configuration.
  • MCP server configuration.
  • Input history.
  • Selected chat sessions.

Kimi CLI vs. Kimi Code CLI

Kimi Code CLILegacy Kimi CLI
StatusCurrent projectLegacy project with maintenance winding down
ImplementationTypeScript and Node.jsPython and uv
Local data~/.kimi-code/~/.kimi/
MigrationImports selected legacy data with kimi migrateProvides data from ~/.kimi/

Kimi Code CLI commands

Command or optionWhat it does
kimiStarts a new interactive terminal session.
kimi --versionShows the installed version.
kimi --helpShows command help.
kimi -p "TEXT"Runs one prompt without opening the TUI.
kimi -p "TEXT" --output-format stream-jsonReturns non-interactive output as JSON lines.
kimi --model NAMEOverrides the model for the current run.
kimi --add-dir PATHAdds another directory to the workspace scope.
kimi --continueContinues the latest session in the current working directory.
kimi --session [ID]Opens the session picker or resumes a specified session.
kimi --yoloStarts in Ask When Needed mode for routine tool approvals.
kimi --autoStarts in Never Ask mode for autonomous execution.
kimi --planStarts in Plan mode for read-only exploration and planning.
kimi --skills-dir PATHLoads Skills from the specified directory for that run in place of auto-discovered Skill directories.
kimi loginStarts non-interactive Kimi Code OAuth login.
kimi acpStarts ACP IDE mode.
kimi webStarts the local web UI server in the foreground.
kimi doctorValidates configuration files without starting the TUI.
kimi exportExports a session as a ZIP file.
kimi migrateMigrates local data from the legacy kimi-cli installation.
kimi upgradeChecks for updates and offers available upgrade options.
kimi vis [sessionId]Opens the session visualizer in a browser.
kimi providerManages providers and model catalogs.

Slash commands

Slash commandWhat it does
/helpShows shortcuts and available commands.
/loginSigns in with Kimi Code OAuth or a Kimi Platform API key.
/logoutClears credentials for the selected account.
/providerOpens the provider manager.
/modelSwitches the current session’s model.
/settingsOpens the TUI settings panel.
/permissionSelects a permission mode.
/newStarts a fresh session.
/sessionsBrowses and restores historical sessions.
/tasksOpens the background task list.
/forkForks a new session while preserving history.
/compactCompacts the current context.
/reloadReloads the current session with updated configuration.
/initAnalyzes the codebase and generates AGENTS.md.
/add-dirAdds another workspace directory to the current session.
/webOpens the current session in the web UI.
/yoloOpens Ask When Needed permission mode.
/autoOpens Never Ask permission mode.
/planToggles Plan mode.
/goalStarts or manages an autonomous goal.
/usageShows token, context, and quota usage.
/statusShows the current session runtime state.
/mcpLists MCP server connection status.
/mcp-configConfigures MCP servers and handles MCP OAuth.
/pluginsOpens the plugin manager.
/skill:<name>Loads an external Skill. Flow Skills also use this namespace.

Provider management

Kimi Code CLI provider types include Kimi, Anthropic, OpenAI Chat Completions, OpenAI Responses, Google GenAI, and Vertex AI. Provider credentials are stored in ~/.kimi-code/config.toml.

kimi provider list
kimi provider catalog list
kimi provider catalog add anthropic --api-key YOUR_API_KEY

MCP setup

Use /mcp-config to add or edit MCP servers and complete MCP OAuth authorization. Use /mcp to view configured servers and their connection status in the current session.

/mcp-config
/mcp

IDE and Zsh integration

ACP-compatible editors launch kimi acp as a child process and reuse the CLI’s existing authentication state.

Zed

Add Kimi Code CLI to Zed’s ~/.config/zed/settings.json. Use the full executable path when kimi is not available on the IDE process PATH.

{
  "agent_servers": {
    "Kimi Code CLI": {
      "type": "custom",
      "command": "kimi",
      "args": ["acp"],
      "env": {}
    }
  }
}

JetBrains IDEs

JetBrains ACP configuration requires the absolute path to the kimi executable.

{
  "agent_servers": {
    "Kimi Code CLI": {
      "command": "/Users/you/.local/bin/kimi",
      "args": ["acp"],
      "env": {}
    }
  }
}

Zsh

The zsh-kimi-cli plugin can switch from Zsh into Kimi Code CLI with Ctrl-X. Clone it into the Oh My Zsh custom plugins directory, add kimi-cli to ~/.zshrc, and reload the shell configuration.

git clone https://github.com/MoonshotAI/zsh-kimi-cli.git \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kimi-cli
plugins=(... kimi-cli)

Agent Skills

Kimi Code CLI loads Agent Skills from SKILL.md files. Skills can live in user directories, project directories, extra configured directories, or built-in package directories.

User-level skill paths

$KIMI_CODE_HOME/skills/
~/.agents/skills/

Project-level skill paths

.kimi-code/skills/
.agents/skills/

Built-in Skills

Built-in skill commandWhat it does
/mcp-configConfigures MCP servers and handles MCP OAuth login.
/custom-themeCreates or edits a TUI color theme.
/update-configInspects or edits runtime and TUI configuration.
/check-kimi-code-docsAnswers Kimi Code product questions against the official documentation.
/import-from-cc-codexImports Claude Code and Codex instructions, Skills, and MCP settings.
/sub-skillReviews or reorganizes local Skills into sub-skill bundles.

Plugins

Kimi Code CLI plugins use a kimi.plugin.json manifest and can package Agent Skills, custom agents, MCP server definitions, lifecycle hooks, system instructions, and slash commands.

Open /plugins to manage installed, official, curated, and custom plugins. Enabled plugin MCP servers and related configuration changes become active after /reload or in a new session.

/plugins

Kimi Code CLI vs. Claude Code or Cursor

ProductPrimary workflowMain distinction
Kimi Code CLITerminal, browser UI, and ACP editor sessionsMIT-licensed CLI with multi-provider configuration, MCP, Agent Skills, plugins, and subagents.
Claude CodeTerminal coding agentAnthropic’s first-party coding agent for Claude workflows.
CursorAI coding editorEditor-centered development environment with integrated coding-agent features.
Gemini CLITerminal coding agentGoogle’s Gemini-focused command-line coding agent.
Qwen CodeTerminal coding agentCommand-line coding agent for the Qwen ecosystem.

Pros

  • MIT-licensed open-source CLI.
  • Terminal, browser, and ACP editor access.
  • MCP, Agent Skills, plugins, and subagents.
  • Multiple provider types.

Cons

  • Model access is required.
  • Auto mode runs with no interactive approval prompts.

Alternatives & Related Resources

FAQs

Q: Is Kimi Code CLI free?
A: Kimi Code CLI is open-source under the MIT license. Model-backed sessions require Kimi Code access, a Moonshot AI Open Platform API key, or credentials for another configured provider.

Q: Does Kimi Code CLI require an API key?
A: Kimi Code OAuth uses device-code authentication with no API key entry. Kimi Platform access uses an API key, and other providers use credentials stored in ~/.kimi-code/config.toml.

Q: Does Kimi Code CLI work on Windows?
A: Yes. Install it from PowerShell and install Git for Windows before the first launch. Kimi Code CLI uses Git Bash as its shell environment on Windows.

Last updated: Sep 16, 2026

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!