Traditional code completion tools suggest snippets as you type, but they lack a deep understanding of your entire project. When refactoring multiple files, debugging complex issues, or automating repetitive tasks, developers often switch between their IDE, terminal, and documentation while manually coordinating each step.
An AI coding agent goes beyond simple suggestions. It analyzes entire repositories, plans multi-step changes, executes commands, and iterates autonomously. Instead of assisting line by line, it functions more like an engineering partner that can handle complex workflows.
Kimi Code is built around this agent-based approach. Running in the terminal and integrating with mainstream IDEs such as VS Code, it combines long-context reasoning with high-speed execution to support multi-file refactoring, debugging, and automation at scale.
Key Features of Kimi Code
Kimi Code combines the power of Kimi K3 with a terminal-first design and deep IDE integration. This agent-led approach is powered by several core features that move beyond simple code completion:
Agent-based workflow
Unlike tools that only suggest code, Kimi Code acts as a true agent. It analyzes your codebase, creates a plan, executes commands, and iterates based on results. Tell it "refactor all API calls to use async/await" and it will identify all relevant files, make the changes, run tests, and fix any issues—all automatically.
Up to 1M context window
Kimi K3 provides a context window of up to 1 million tokens, meaning Kimi Code can understand your entire project structure, dependencies, and patterns. It doesn't just see the file you're editing—it sees how everything connects. This makes multi-file refactoring, architecture changes, and large-scale debugging possible. Kimi K3 also brings native visual understanding, so it can reason over screenshots, diagrams, and video as part of a coding task.
Plan mode and shell mode
Plan mode: Press
Shift-Tab(or type/plan) to enter Plan mode. Kimi Code researches your codebase and proposes a step-by-step plan for your approval before touching any files—the safest way to start a large change.Shell mode: Type
!in the input box to run terminal commands without leaving the conversation. The output is written into the context so the AI can build on it in later turns. PressCtrl+Bto move a long-running command into the background and check on it later in the/taskspanel.
This flexibility lets you seamlessly move between careful planning, AI-driven execution, and direct command execution.
Thinking effort levels
Kimi K3 supports low / high / max thinking effort levels, so you can pick the right intensity for each task—lighter effort for quick questions, maximum effort for complex architectural decisions, tricky bugs, or large refactors. Switch models at any time with the /model command.
Tip: switching models invalidates the existing prompt cache, so start a fresh session with /new before putting Kimi K3 to work—you get better quality and lower token consumption.
Advanced interaction features
Multi-line input: Press
Shift-EnterorCtrl-Jto insert line breaks when pasting code or error logsPath autocomplete: Type
@to autocomplete file and directory paths from your working directoryImage and video paste: Press
Ctrl-V(Alt-Von Windows) to paste images or video clips for AI analysis—useful for reproducing UI bugs or walking through a design (video input requires a model with video support)Approval system: Kimi Code asks for confirmation before modifying files or running commands. Two automation levels are available when you need them: YOLO mode (
kimi --yoloor/yolo) auto-approves tool actions but may still ask questions, while Auto mode (kimi --autoor/auto) is fully autonomous and never asks—ideal for unattended runs
Standard and HighSpeed tiers
Kimi Code offers two speed tiers built on the same model with identical coding ability:
Standard: the default tier for everyday work
HighSpeed: roughly 5–6× the output speed of Standard, up to 100 Tokens/s with high stability. Switch instantly with
/modelin the CLI, or use thekimi-for-coding-highspeedmodel ID in third-party tools. HighSpeed requires an Allegretto plan or above
Quota-wise, a rolling 5-hour window supports approximately 300–1,200 requests with up to 30 concurrent requests, on top of a weekly quota that refreshes automatically every 7 days.
Seamless IDE integration
Kimi Code CLI natively supports Agent Client Protocol (ACP) through the kimi acp subcommand, enabling integration with:
VS Code: Full Kimi Code extension available
Zed: Native ACP support
JetBrains IDEs: ACP compatibility via the AI chat plugin
MCP (Model Context Protocol) support
Kimi Code supports Model Context Protocol (MCP), an open protocol that allows AI models to safely interact with external tools and data sources. This extends Kimi Code's capabilities beyond code editing:
External tool integration: Connect to databases, APIs, documentation sources, and development tools
Custom workflows: Build specialized agents for specific tasks like security scanning, performance analysis, or documentation generation
Ecosystem compatibility: Use existing MCP servers from the community or create your own
MCP servers are configured in mcp.json—at the user level (~/.kimi-code/mcp.json) or per project (.kimi-code/mcp.json)—or interactively with the /mcp-config command; /mcp shows the connection status of all configured servers. stdio, HTTP, and SSE transports are all supported, and MCP tools follow the same approval mechanism as other Kimi Code operations for security.
Session and context management
Kimi Code provides powerful session management and long context handling capabilities for complex, multi-step workflows:
Session persistence: Conversations are automatically saved. Resume any session with
--continueor switch between multiple projects with--session <id>Context compression: When approaching context limits, use
/compactto have AI summarize conversation history while preserving key information—you can even pass an instruction to hint what to keepUsage monitoring: Run
/usageat any time to see token usage, context consumption, and quota informationFresh starts: Use
/new(alias/clear) to reset the current session contextForking and export:
/forkbranches a session with full history, and/export-mdsaves any session as a Markdown fileBackground tasks: Press
Ctrl+Bto move long-running commands and sub-agents into the background, and track them in the/taskspanel
This makes Kimi Code ideal for long-running development tasks that span multiple files and require maintaining context over extended periods.
Autonomous goals, swarms, and plugins
For work that runs longer than a single prompt, Kimi Code offers higher-level automation:
Goal mode: Start an autonomous objective with
/goal <objective>and Kimi Code works toward it across multiple turns until it's done or hits a decision point. Queue up follow-up work with/goal nextSwarm mode:
/swarm <task>runs multiple agents on the same objective in parallel, with live progress and rate-limit-aware retriesPlugins and Agent Skills: Install plugin packages that bundle skills and MCP servers from the official marketplace via
/plugins, or teach Kimi Code your own reusable workflows as Markdown-based skillsScheduled tasks: Set timed schedules or one-off reminders in natural language, and Kimi Code executes them automatically at the right time
Device security and compatibility
Kimi Code includes security and compatibility features that make it suitable for professional workflows:
30-day device expiration: For security, devices inactive for over 30 days are automatically unbound. This ensures that unused devices don't remain authorized indefinitely—just run
/loginagain to restore accessWorks with your favorite agents: Beyond the official CLI and VS Code extension, the Kimi Code API speaks both the OpenAI-compatible and Anthropic-compatible protocols, with official setup guides for Claude Code, OpenCode, Codex, and more
Cross-platform consistency: Whether you're on macOS, Linux, or Windows (via the bundled Git Bash), Kimi Code provides a consistent experience with the same commands and features
Kimi Code Membership Benefits
Kimi Code is a premium membership benefit within the Kimi membership plan, specifically designed for code development scenarios. Subscribe to unlock complete AI programming capabilities, including API access, high-performance computing resources, and comprehensive IDE integration support. Requests from the CLI, the VS Code extension, and third-party tools all share the same quota, which refreshes automatically every 7 days.
Core Benefits
| Benefit | Description |
|---|---|
| Latest Flagship Models | Kimi K3 available to Moderato members and above; Kimi K2.7 Code available to all members |
| Up to 1M Context | Allegretto members and above unlock its full 1M-token context window |
| HighSpeed Tier | Roughly 5–6× faster output, up to 100 Tokens/s, for Allegretto members and above |
| High Concurrency | Support for up to 30 concurrent requests for complex tasks |
| Generous Quota | Weekly quota refreshed every 7 days, plus a rolling 5-hour window of ~300–1,200 requests |
| Extra Usage | Optional pay-as-you-go balance shared with Kimi on the web—keeps tasks running after quota ends |
| Wide Compatibility | Supports Kimi Code CLI, VS Code, Claude Code, OpenCode, Codex, and other mainstream agents |
| Native IDE Integration | Plug-and-play support for VS Code, Zed, JetBrains, and other major IDEs |
How to use Kimi Code?
Step 1: Install Kimi Code CLI
Kimi Code CLI is written in TypeScript and runs on Node.js—no Python environment required.
Linux/macOS (recommended):
Windows (PowerShell):
On Windows, install Git for Windows before the first launch—the CLI uses the bundled Git Bash.
Alternative via npm (requires Node.js 22.19.0 or later):
Already using the legacy Python-based kimi-cli? Run kimi migrate after installing to import your existing configuration, sessions, and MCP declarations in one step.
Step 2: Authenticate and configure
Start Kimi CLI:
Then authenticate using one of these methods:
Option A: OAuth login (recommended)
Run the /login command and choose "Kimi Code (OAuth)". Kimi Code uses the OAuth device-code flow: open the link shown in your terminal, sign in with your Kimi account, and enter the user code to authorize—no manual API key management needed.
Option B: API key setup
Choose "Kimi Platform API key" in /login instead (or configure a provider with /provider). When integrating third-party development tools, create and manage API Keys in the Kimi Code Console—up to 5 keys, each shown only once upon creation.
Step 3: Start coding with AI
Once authenticated, you can start using Kimi Code immediately.
Here are some example commands:
Basic code generation:
Multi-file refactoring:
Debugging:
Step 4: Use advanced features
Switch to Kimi K3 for the hardest tasks:
Run /model and select Kimi K3, then pick a thinking effort level (low / high / max) that matches the task. For the best results and lower token consumption, start a fresh session with /new before switching models.
Run shell commands inline:
Type ! followed by the command to execute it directly from the chat input.
Enter Plan mode for careful changes:
Press Shift-Tab so Kimi Code researches first and proposes a plan before editing files.
Paste code, images, or videos:
Press Ctrl-V (Alt-V on Windows) to paste from the clipboard, then Shift-Enter or Ctrl-J for multi-line input.
Reference project files:
Type @ followed by a file or directory name for autocomplete.
Step 5: Integrate with your IDE
VS Code:
Install the "Kimi Code" extension from the VS Code marketplace, then sign in with your Kimi account—or skip sign-in to use your existing API key configuration.
Access settings and additional options from the gear icon in the panel.
Open the Command Palette and type "Kimi Code" to access additional commands.
Zed:
Kimi Code CLI supports ACP natively through the kimi acp subcommand. Add Kimi Code as an external agent in Zed's settings:
{ "agent_servers": { "kimi": { "command": "kimi", "args": ["acp"] } } }JetBrains IDEs: Enable the AI chat plugin and add Kimi Code from "Configure ACP agents" to drive Kimi sessions directly from your IDE.
Step 6: Manage sessions and context
Kimi Code's session management helps you maintain context across long development sessions:
View and switch sessions:
Resume a previous session:
Switch to a specific session:
Start a fresh session:
Compress context when approaching limits:
Run /usage at any time to monitor token usage, context consumption, and quota. For best results with long context tasks, use /compact periodically to summarize conversation history while preserving key information.
Step 7: Configure MCP (Model Context Protocol)
Extend Kimi Code's capabilities with MCP servers for external tool integration. Servers are declared in mcp.json—~/.kimi-code/mcp.json at the user level, or .kimi-code/mcp.json for a single project (project entries override user entries with the same name):
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp",
"headers": { "CONTEXT7_API_KEY": "your-key" }
}
}
}Entries with a command field are stdio servers; entries with a url field are HTTP servers (set "transport": "sse" only for legacy SSE services). Prefer a point-and-click flow? Run /mcp-config in the TUI to add, edit, or delete servers interactively, and /mcp to check connection status. For servers that require OAuth, run /mcp-config login <server-name>.
Use MCP tools in your workflow: Once configured, Kimi Code can automatically invoke MCP tools. For example, with a database MCP server:
MCP tools follow the same approval mechanism as other Kimi Code operations. In YOLO mode, MCP operations are auto-approved for faster workflows.
Step 8: Alternative interfaces
Browser UI:
Launch the web-based interface for a graphical experience. It runs in the foreground and opens your browser automatically—stop it with Ctrl+C:
From inside the TUI, run /web to continue the current session in the browser. You can also open the session visualizer with kimi vis to see a whole session unfold at a glance.
Upgrade or uninstall:
If you installed via npm, upgrade with npm install -g @moonshot-ai/kimi-code@latest instead. To uninstall, delete the kimi executable (script installation) or run npm uninstall -g @moonshot-ai/kimi-code (npm installation).
Real-world use cases
Kimi Code excels at complex coding tasks that go beyond simple autocomplete. Below are five practical scenarios:
1. Large-scale code refactoring
Scenario: You need to migrate a legacy codebase from one framework to another, or update coding patterns across hundreds of files.
Example prompt:
2. Complex debugging
Scenario: You're facing a production bug that involves multiple services, database queries, and API calls. Traditional debugging tools aren't giving you the full picture.
Example prompt:
3. Automated test generation
Scenario: You have a large codebase with low test coverage. You need comprehensive tests but don't want to write them manually.
Example prompt:
4. Project setup and configuration
Scenario: You're starting a new project and need to set up the entire development environment, including dependencies, configuration files, CI/CD, and documentation.
Example prompt:
5. External tool integration with MCP
Scenario: You need to integrate with external tools like databases, APIs, or specialized services that aren't part of your codebase. Using MCP (Model Context Protocol), Kimi Code can securely interact with these external resources.
Example prompt:
Conclusion
Kimi Code represents the next generation of AI coding assistants by combining Kimi K3—the world's first open 3T-class model—with a true agent-based workflow. Unlike traditional code completion tools that only react to your typing, Kimi Code proactively plans, executes, and iterates—making it ideal for complex tasks like multi-file refactoring, debugging, and automation.
With its up-to-1M context window, Standard and HighSpeed speed tiers, and seamless IDE integration, Kimi Code transforms how developers approach coding. Whether you're migrating legacy code, debugging production issues, or setting up new projects, Kimi Code provides the intelligent assistance you need to work faster and more effectively.
FAQ
kimi acp subcommand.kimi-for-coding). Moderato members and above can select Kimi K3 (k3 or the 256K variant k3-256k), and Allegretto members and above additionally unlock the full 1M-token context window and the HighSpeed tier (kimi-for-coding-highspeed). Switch models in the CLI with /model.low / high / max thinking effort levels, so you can choose the right intensity for each task—higher effort spends more time reasoning, which helps with complex architectural decisions or tricky bugs. Thinking effort is a per-model setting; pick the model and effort that fit your task when you switch with /model. For best results, start a fresh session with /new after switching, since changing models invalidates the prompt cache.kimi --yolo or /yolo) auto-approves tool actions but may still ask questions; Auto mode (kimi --auto or /auto) is fully autonomous and never asks. Use these only in safe environments, and always review changes before committing.! in the input box to enter shell mode and run terminal commands without leaving the conversation—the output is written into the context so the AI can use it in later turns. For long-running commands, press Ctrl+B to move them into the background and check their status anytime in the /tasks panel.mcp.json (user-level ~/.kimi-code/mcp.json or project-level .kimi-code/mcp.json) or interactively with /mcp-config, and /mcp lists their connection status. stdio, HTTP, and SSE transports are supported, and MCP tools follow the same approval mechanism as other Kimi Code operations for security./sessions to view and switch between sessions, --continue to resume previous work, and /compact to have the AI summarize conversation history while preserving key information. Run /usage to check token usage, context consumption, and quota at any time. With an up-to-1M context window and intelligent compression, Kimi Code handles long-running development tasks effectively.kimi web to launch the web-based interface—it runs in the foreground and opens your browser automatically. From inside the TUI, /web continues your current session in the browser, and kimi vis opens a session visualizer. This is useful when you prefer a visual interface or need to share your screen during pair programming./help for help, /login for authentication, /model to switch models, /sessions (alias /resume) for session management, /new (alias /clear) to start fresh, /compact to compress conversation, /usage to check quota, /plan for Plan mode, /yolo and /auto for automation modes, /tasks for background tasks, /goal and /swarm for autonomous work, /web to open the session in a browser, /export-md to export, /mcp for MCP status, and /exit to quit. Type / in the CLI to see the full list.