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 webcommand. - Works as an ACP agent server through the
kimi acpcommand. - 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 visfor agent trace inspection in a browser. - Integrates with Zsh through the
zsh-kimi-cliplugin.
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 | bash2. Install Kimi Code CLI on Windows from PowerShell.
irm https://code.kimi.com/kimi-code/install.ps1 | iex3. Install with npm if you prefer the package manager route.
npm install -g @moonshot-ai/kimi-code4. Verify the installation.
kimi --version5. Start Kimi Code CLI from a project directory.
cd your-project
kimi6. 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.
/login7. Generate project instructions if the repository does not already include an AGENTS.md file.
/init8. 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 web11. Upgrade to the latest version.
kimi upgrade12. Uninstall Kimi Code CLI if you installed it through npm.
npm uninstall -g @moonshot-ai/kimi-codeKimi Code CLI commands
| Command or option | What it does |
|---|---|
kimi | Starts a new interactive terminal session. |
kimi --version | Shows the installed version. |
kimi --help | Shows command help. |
kimi -p "TEXT" | Runs one prompt without opening the TUI. |
kimi -p "TEXT" --output-format stream-json | Returns non-interactive output as JSON lines. |
kimi --model NAME | Overrides the model for the current run. |
kimi --add-dir PATH | Adds another directory to the workspace scope. |
kimi --continue | Continues the latest session in the current working directory. |
kimi --session [ID] | Opens the session picker or resumes a specified session. |
kimi --yolo | Auto-approves regular tool calls in a trusted working directory. |
kimi --auto | Runs with fully automatic approvals and no user questions. |
kimi --plan | Starts in Plan mode for read-only exploration and planning. |
kimi --skills-dir PATH | Loads Skills from the specified directory for that run. |
kimi login | Starts non-interactive Kimi Code OAuth login. |
kimi acp | Starts ACP IDE mode. |
kimi web | Starts the local web UI server in the foreground. |
kimi doctor | Validates configuration files without starting the TUI. |
kimi export | Exports a session as a ZIP file. |
kimi migrate | Migrates local data from the legacy kimi-cli installation. |
kimi upgrade | Checks for updates and offers available upgrade options. |
kimi provider | Manages providers and model catalogs. |
Slash commands
| Slash command | What it does |
|---|---|
/help | Shows shortcuts and available commands. |
/login | Signs in with Kimi Code OAuth or a Kimi Platform API key. |
/logout | Clears credentials for the selected account. |
/provider | Opens the provider manager. |
/model | Switches the current session’s model. |
/settings | Opens the TUI settings panel. |
/permission | Selects a permission mode. |
/new | Starts a fresh session. |
/sessions | Browses and restores historical sessions. |
/tasks | Opens the background task list. |
/fork | Forks a new session while preserving history. |
/compact | Compacts the current context. |
/reload | Reloads the current session with updated configuration. |
/init | Analyzes the codebase and generates AGENTS.md. |
/add-dir | Adds another workspace directory to the current session. |
/web | Opens the current session in the web UI. |
/yolo | Toggles approval skipping for regular tool calls. |
/auto | Toggles fully automatic approval mode. |
/plan | Toggles Plan mode. |
/goal | Starts or manages an autonomous goal. |
/usage | Shows token, context, and quota usage. |
/status | Shows the current session runtime state. |
/mcp | Lists MCP server connection status. |
/mcp-config | Configures MCP servers and handles MCP OAuth. |
/plugins | Opens 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 listkimi provider catalog listkimi provider catalog add PROVIDER_NAMEMCP 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-configUse /mcp to view each configured server and its connection status in the current session.
/mcpUse /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-cliAdd 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 command | What it does |
|---|---|
/mcp-config | Configures MCP servers and handles MCP OAuth login. |
/custom-theme | Creates or edits a TUI color theme. |
/update-config | Inspects or edits runtime and TUI configuration. |
/check-kimi-code-docs | Answers product questions against the official documentation. |
/import-from-cc-codex | Imports Claude Code and Codex instructions, Skills, and MCP settings. |
/sub-skill | Reviews 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.
/pluginsPlugin 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
| Tool | Best fit | Main difference |
|---|---|---|
| Kimi Code CLI | Developers 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 Code | Developers who already use Anthropic’s coding agent in the terminal. | It is a first-party Anthropic tool built around Claude workflows. |
| Cursor | Developers who want an AI coding IDE. | It is editor-first, while Kimi Code CLI is terminal-first. |
| Gemini CLI | Developers who want a Google Gemini terminal agent. | It focuses on Gemini model access and Google’s CLI workflow. |
| Qwen Code CLI | Developers 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
- Best CLI AI Coding Agents: Compare Kimi Code CLI with other popular AI coding agents.
- AI Coding Agents: Discover more free & open-source AI coding agents.
- Claude Code: Browse Claude Code tools, plugins, skills, and guides.
- Claude Code Resource List: Explore Claude Code agents, skills, plugins, utilities, and alternatives.
- Kimi Model Timeline: Kimi Release Dates and Version History.
- Kimi Code CLI documentation: Read the official installation, configuration, command, and reference documentation.
- MCP Servers directory: Find MCP servers to connect with Kimi Code CLI.
- Most Popular Agent Skills: Browse popular Agent Skills for coding agents.
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.










