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

An open-source CLI AI coding agent with Kimi access, MCP, providers, skills, plugins, subagents, and browser UI.

Kimi Code CLI is a free, open-source AI coding agent that runs directly in your terminal.

It can read and edit code, run shell commands, search files, fetch web pages, connect to MCP servers, manage sessions, and work through interactive CLI, browser UI, and ACP editor modes.

See Kimi API Pricing here.

This coding agent is useful if you want a terminal-first coding assistant with Kimi models, API-key provider configuration, Agent Skills, plugins, subagents, lifecycle hooks, and local project context.

Features

  • Runs as an interactive terminal agent.
  • Opens a local browser interface through the kimi web command.
  • Works as an ACP agent server through the kimi acp command.
  • Reads and edits project files inside the configured workspace.
  • Executes shell commands with approval controls.
  • Searches and fetches web pages when the selected provider supports those services.
  • Connects to MCP servers configured through the CLI.
  • Loads Agent Skills from user, project, extra, and built-in directories.
  • Uses plugins that can bundle Skills, MCP servers, and lifecycle hooks.
  • Delegates focused planning, exploration, and coding tasks to built-in or custom subagents.
  • Runs lifecycle hooks for approvals, auditing, notifications, and local automation.
  • Accepts video input when the selected model declares that capability.
  • Includes Plan mode for read-only codebase exploration before implementation.
  • Lets you resume, fork, export, import, title, and undo sessions.
  • Accepts image input when the selected model declares that capability.
  • Works with Kimi, OpenAI Chat Completions, OpenAI Responses, Anthropic, Gemini, and Vertex AI provider types.
  • Includes kimi vis for agent trace inspection in a browser.
  • Integrates with Zsh through the zsh-kimi-cli plugin.

How to Use It

Installation

1. Install Kimi Code CLI on Linux or macOS with the install script.

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

2. Install Kimi Code CLI on Windows from PowerShell.

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

3. Install with npm if you prefer the package manager route.

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

4. Verify the installation.

kimi --version

5. Start Kimi Code CLI from a project directory.

cd your-project
kimi

6. Configure model access inside Kimi Code CLI. The login flow supports Kimi Code OAuth and Moonshot AI Open Platform API keys. Other provider types can be configured through /provider, kimi provider, environment variables, or the config file.

/login

7. Generate project instructions if the repository does not already include an AGENTS.md file.

/init

8. Use natural language in the terminal.

Explain the authentication flow in this repository.

9. Type ! in an empty input box to enter shell mode.

Kimi Code CLI adds shell command output to the conversation context. Review permission prompts carefully before you allow file edits, shell commands, or network-facing actions.

10. Open the browser UI when you want a graphical session view.

kimi web

11. Upgrade to the latest version.

kimi upgrade

12. Uninstall Kimi Code CLI if you installed it through npm.

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

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 --yoloAuto-approves regular tool calls in a trusted working directory.
kimi --autoRuns with fully automatic approvals and no user questions.
kimi --planStarts in Plan mode for read-only exploration and planning.
kimi --skills-dir PATHLoads Skills from the specified directory for that run.
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 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.
/yoloToggles approval skipping for regular tool calls.
/autoToggles fully automatic approval 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 use the same command form.

Provider management

You can manage model providers without launching the terminal UI. The kimi provider command can add, list, remove, and import providers from a custom registry file or the public models.dev catalog.

kimi provider list
kimi provider catalog list
kimi provider catalog add PROVIDER_NAME

MCP setup

Kimi Code CLI lists connected MCP servers with /mcp and configures servers or OAuth access with /mcp-config.

Open the MCP configuration workflow from the interactive TUI.

/mcp-config

Use /mcp to view each configured server and its connection status in the current session.

/mcp

Use /mcp-config to add or edit servers and complete OAuth authorization when a server requires it.

IDE and Zsh integration

Kimi Code CLI can run inside ACP-compatible editors.

Use this configuration for Zed.

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

Use this configuration for JetBrains IDEs.

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

Kimi Code CLI also supports Zsh through the zsh-kimi-cli plugin.

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

Add kimi-cli to the plugin list in ~/.zshrc.

plugins=(... kimi-cli)

Restart Zsh, then press Ctrl-X to switch to agent mode.

Agent Skills and plugins

Kimi Code CLI supports Agent Skills through SKILL.md files. Skills can live at user level, project level, extra skill directories, or built-in package directories.

User-level skill paths include:

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

Project-level skill paths include:

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

The CLI includes built-in Skills for common configuration and migration tasks:

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

Kimi Code CLI also supports plugins. A plugin can bundle Skills, MCP server definitions, and hooks through a kimi.plugin.json manifest. The plugin manager shows its source and trust level.

Open the plugin manager, then select a marketplace source or install from a local path, ZIP URL, or GitHub repository.

/plugins

Plugin changes take effect after /reload or in a new session. Third-party sources require confirmation before installation.

Kimi Code CLI vs. Claude Code or Cursor

ToolBest fitMain difference
Kimi Code CLIDevelopers who want an open-source terminal agent with Kimi Code, ACP, MCP, skills, plugins, subagents, and browser UI.It runs as an MIT-licensed CLI and supports multiple provider types.
Claude CodeDevelopers who already use Anthropic’s coding agent in the terminal.It is a first-party Anthropic tool built around Claude workflows.
CursorDevelopers who want an AI coding IDE.It is editor-first, while Kimi Code CLI is terminal-first.
Gemini CLIDevelopers who want a Google Gemini terminal agent.It focuses on Gemini model access and Google’s CLI workflow.
Qwen Code CLIDevelopers who want a Qwen3-Coder terminal agent.It is optimized for Qwen coding models.

Pros

  • Terminal-first workflow.
  • Browser UI available.
  • ACP editor support.
  • MCP server management.
  • Agent Skills support.
  • Plugin manager with source and trust information.
  • Multi-provider configuration.
  • Subagents, lifecycle hooks, and video input support.
  • Built-in upgrade command and background upgrade option.
  • Active release cadence.

Cons

  • Model access required.
  • Terminal comfort required.
  • YOLO and Auto modes need caution.

Alternatives & Related Resources

FAQs

Q: Is Kimi Code CLI free?
A: Kimi Code CLI is open-source under the MIT license. You still need Kimi Code access, a Moonshot AI Open Platform API key, or another configured provider to run model-backed agent sessions.

Q: Does Kimi Code CLI require an API key?
A: Kimi Code CLI can use Kimi Code OAuth through /login. Moonshot AI Open Platform access uses an API key, and other providers can be managed with /provider, kimi provider, environment variables, or ~/.kimi-code/config.toml.

Q: What are Agent Skills in Kimi Code CLI?
A: Agent Skills are Markdown files with YAML frontmatter that give Kimi Code CLI reusable instructions, project standards, workflows, and task-specific guidance. Kimi Code CLI loads them from user, project, extra, and built-in locations, including $KIMI_CODE_HOME/skills/ and .kimi-code/skills/.

Q: What are Kimi Code CLI plugins?
A: Kimi Code CLI plugins package Skills, MCP server definitions, and hooks through a kimi.plugin.json manifest. Use /plugins to browse, install, enable, disable, or remove them.

Changelog

July 27, 2026

  • Adds custom Markdown agents, tool-gating controls, and configurable subagent delegation in the experimental v2 engine.
  • Adds thinking-effort selection from ACP clients and direct video attachments in the TUI and web UI.
  • Adds global MCP timeouts, web search and fetch configuration without OAuth, and per-subagent model preferences.
  • Updates the web UI, session handling, plugin manager, Agent Skills, and MCP workflows.

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!