Kimi Code

Featured

Moonshot AI's open-source terminal coding agent: an MIT-licensed CLI with MCP and editor integration, driving Kimi K3 and K2.7 Code via Kimi membership.

Developer
Moonshot AI
Type
CLI Tool & Editor Integration
Pricing
Freemium
AI Model
Kimi K3 (k3), Kimi K2.7 Code (kimi-for-coding), Kimi K2.7 Code HighSpeed — configurable for other compatible providers
Difficulty
Intermediate
On this page

Kimi Code is Moonshot AI's open-source coding agent that runs in your terminal. It reads and edits code, runs shell commands, searches files, and fetches web pages, choosing its next step from the feedback it gets. It works out of the box with Moonshot's Kimi models and can be pointed at other compatible providers.

Overview

Kimi Code is Moonshot AI's answer to the terminal coding agent — the same category as Claude Code and Qwen Code. It shipped in early June 2026 alongside the Kimi K2.7 Code model, and it is the surface Moonshot now points developers at for agentic coding with Kimi K3.

Two things distinguish it from an IDE assistant. First, it lives in the terminal (with editor integration layered on top), so it drives whole workflows — edits across many files, command execution, web fetches — rather than completing the line you are typing. Second, it is genuinely open source: the CLI is published as MoonshotAI/kimi-code under the MIT license and written in TypeScript.

The important distinction to keep straight is client vs. API. Kimi Code is a client. Inside it, models are selected by product IDs (k3, kimi-for-coding, kimi-for-coding-highspeed) and access is gated by your Kimi membership plan, not billed per token. That is a different world from the raw Kimi API, which uses IDs like kimi-k3 and bills per token. If you have read about K3's pricing or its max-only reasoning setting, note that the Code product exposes its own presets — including reasoning-effort levels the public API does not yet document.

Key Features

Moonshot frames Kimi Code around four jobs — writing and refactoring code, exploring large codebases, running technical tasks and shell automation, and researching from the web mid-task. Those describe the surface; what actually sets the tool apart is structural.

It is genuinely open source. The CLI ships on GitHub under the MIT license, written in TypeScript, so you can read, fork, and patch the agent itself rather than treat it as a black box — a sharper line than most commercial coding agents draw. Extensibility is MCP-native: you add, edit, and authenticate Model Context Protocol servers conversationally with /mcp-config instead of hand-editing JSON, which lowers the barrier to wiring in your own docs and internal services. The agent is also not confined to the terminal — it plugs into editors such as Zed and JetBrains over the Agent Client Protocol (ACP), with a separate Kimi Code for VS Code path in the documentation.

Two more things matter in practice. Kimi Code runs on Moonshot's models by default but can be pointed at other compatible providers, so you are not strictly locked to its backend. And it exposes a three-model menu on a single subscription: the 1M-context flagship K3 for long-horizon work, the cheaper K2.7 Code for sustained edit-run-fix loops, and a HighSpeed variant that trades quota for faster output.

How It Works

Kimi Code follows the standard agentic loop: it reads the relevant context, proposes an action, executes it against your file system or shell, and uses the result to decide what to do next.

  1. Authenticate — on first launch you run /login and choose either Kimi Code OAuth or a Moonshot AI Open Platform API key.
  2. Pick a model — select k3, kimi-for-coding, or kimi-for-coding-highspeed depending on the task and your plan.
  3. Describe the task — the agent gathers context from your project, reads and edits files, runs commands, and fetches web pages as needed.
  4. Iterate on feedback — each tool result feeds the next step until the task is complete.

Two operational details from Moonshot's own guidance are worth internalizing, because they affect both output quality and cost:

  • Switching models invalidates the context cache. If you change models mid-task, the prior cache no longer applies; starting a fresh session gives better results and lower consumption.
  • Changing reasoning effort also invalidates the cache. Keep the effort level consistent within a session rather than toggling it repeatedly.

Technical Details

  • License: MIT (open source)
  • Language: TypeScript
  • Repository: MoonshotAI/kimi-code
  • Node.js: ≥ 24.15.0 is required for building from source; the installed binary does not require Node.js
  • Authentication: /login → Kimi Code OAuth or Moonshot AI Open Platform API key
  • Extensibility: MCP servers via /mcp-config; editor integration via the Agent Client Protocol (ACP)
  • Platforms: macOS, Linux, and Windows

The models inside Kimi Code

Display nameModel IDContextThinking / reasoningPlan required
Kimi K3k3up to 1M tokensreasoning effort low / high / max (default max)Moderato (256K) → Allegretto+ (full 1M); not on Andante
Kimi K2.7 Codekimi-for-coding256K tokensthinking always onall membership tiers
Kimi K2.7 Code HighSpeedkimi-for-coding-highspeed256K tokensthinking always on; ~5–6× faster output at 3× quotaAllegretto and above

Two nuances: the HighSpeed speed-up applies only to model output generation — tool calls (reading and writing files, running commands) and script execution are unaffected. And k3 here exposes three reasoning-effort levels; on Moonshot's public Kimi K3 API, reasoning_effort is currently documented as accepting only max, so the Code product is surfacing presets ahead of the API.

Use Cases

Everyday engineering. Because it drives the whole terminal rather than completing the line you are typing, Kimi Code fits multi-file refactors, debugging loops where it reproduces a failure and runs commands to verify a fix, and onboarding — point it at an unfamiliar module and ask how the pieces connect.

Long-horizon and agentic work. The 1M-token window on k3 (Allegretto and up) suits long repositories and extended agent trajectories without a per-token context surcharge inside your plan. Web fetches let the agent ground its answers in current documentation without leaving the session, and MCP servers extend its reach to your internal data and services.

Cost-sensitive loops. Not every task needs the flagship. kimi-for-coding keeps repetitive edit-run-fix cycles cheap, and the HighSpeed variant trims wall-clock time on output-heavy generations when you are willing to spend 3× quota to get there — though, as noted below, that speed-up applies to generation only, not to the tool calls an agentic loop leans on.

Integrations

  • Terminal / CLI — the primary interface (kimi-code).
  • VS Code — a dedicated extension path documented under "Kimi Code for VS Code."
  • Zed and JetBrains — editor integration through the Agent Client Protocol (ACP).
  • MCP servers — connect external tools and data sources, configured conversationally with /mcp-config.
  • Other providers — configurable to run against compatible non-Kimi endpoints.

Pricing & Access

The CLI is free and MIT-licensed; the models are not. Kimi Code is bundled into Kimi membership rather than sold on its own, and both which model you can reach and how much Kimi Code usage you get scale with your plan.

Kimi's help center lists the ladder as Adagio (free trial), then the paid tiers Andante → Moderato → Allegretto → Allegro, with higher tempo-named tiers (Vivace, Prestissimo) appearing in some plan navigation. Kimi Code credits scale across the paid plans — roughly 1× at Andante, 4× at Moderato, 20× at Allegretto, and 60× at Allegro.

Model access inside Kimi Code is gated like this:

  • Adagio (free) / Andante — no k3; paid Kimi Code credits begin at Andante, and Adagio is a limited free trial.
  • Moderato — unlocks k3 at a 256K context window.
  • Allegretto and above — unlocks the full 1M context on k3, plus the HighSpeed models.

On exact prices, sources disagree and figures differ by region. Kimi's official help center quotes CNY — Andante ¥49, Moderato ¥99, Allegretto ¥199, Allegro ¥699 per month — while third-party trackers list USD equivalents in roughly the $19–$99 range for the mid tiers. Treat any figure as indicative and confirm on the Kimi Code plan docs or the membership pricing page before committing, since Moonshot has changed both plans and gating quickly across the K2.6 → K2.7 Code → K3 releases. Alternatively, configure the CLI against your own compatible provider and pay that provider directly, bypassing Kimi membership for model access.

Getting Started

Step 1: Install

macOS / Linux:

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

Homebrew:

brew install kimi-code

Windows (PowerShell):

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

Step 2: Authenticate

kimi-code      # launch the agent
/login         # choose Kimi Code OAuth or a Moonshot Open Platform API key

Step 3: Start working

  1. Navigate to your project directory and launch the agent.
  2. Select a model with the model picker (k3, kimi-for-coding, or kimi-for-coding-highspeed).
  3. Describe the task and review the agent's file-system and command actions.

Best practices

  • Start a fresh session when you switch models — it avoids stale cache and lowers consumption.
  • Hold reasoning effort steady within a session — changing it invalidates the cache.
  • Match the model to the job — flagship k3 for long-horizon and large-context work, kimi-for-coding for cheap sustained loops, HighSpeed when output latency dominates.
  • Wire in MCP servers for your docs and internal data so the agent can reach them.

Limitations

  • Model access is paywalled — the client is open source, but useful work needs a paid Kimi membership (or a bring-your-own provider), so "open source" does not mean "free to run."
  • Always-on thinking on the coding modelskimi-for-coding and the HighSpeed variant keep thinking enabled, and k3 defaults to max reasoning; that costs tokens/quota on trivial calls where a non-reasoning model would be cheaper.
  • HighSpeed only speeds output — tool calls and script execution are unaffected, so agentic loops heavy on file operations see less benefit.
  • Plan-dependent context — the headline 1M window on k3 requires an Allegretto-or-higher plan; lower tiers cap at 256K.
  • Fast-moving product — models, IDs, plan gating, and pricing have shifted quickly across the K2.6 → K2.7 Code → K3 releases; verify current details in the docs.

Alternatives

  • Claude Code — Anthropic's terminal agent, the closest peer, with a mature MCP ecosystem and frontier Claude models.
  • Qwen Code — Alibaba's open-source, model-agnostic terminal agent; the nearest open-source analogue.
  • Cursor — an AI-first code editor if you prefer a GUI over a terminal-driven workflow.
  • Cline — an open-source VS Code extension with bring-your-own-key model access.
  • GitHub Copilot — IDE-native assistance and agent modes across major editors.

Community & Support

Frequently Asked Questions

The Kimi Code CLI itself is free and open source under the MIT license. The models it drives are not: Kimi K3 and the HighSpeed variant are gated behind higher Kimi membership tiers, and even the base Kimi K2.7 Code runs on Kimi Code credits that come with the paid plans (from Andante up). You can also point the CLI at another compatible provider and pay that provider instead.
Kimi Code is a terminal coding agent (a client), not an API. Inside it, models carry product IDs like k3, kimi-for-coding, and kimi-for-coding-highspeed, and access is gated by subscription plan rather than billed per token. The raw Kimi API bills per token and uses model IDs like kimi-k3 and kimi-k2.7-code.
Three IDs mapping to two models: k3 (Kimi K3, up to 1M context), kimi-for-coding (Kimi K2.7 Code, 256K context, thinking always on), and kimi-for-coding-highspeed (the same K2.7 Code roughly 5–6x faster at 3x quota). It can also be configured to use other compatible providers.
Per Moonshot's Kimi Code docs, k3 is unavailable on the entry Andante tier, runs with a 256K window on Moderato, and unlocks the full 1M context — plus the HighSpeed models — on Allegretto and above.
Yes. It ships with AI-native MCP configuration: you add, edit, and authenticate Model Context Protocol servers conversationally with the /mcp-config command. It also integrates with editors such as Zed and JetBrains over the Agent Client Protocol (ACP).

Explore More AI Tools

Discover other AI applications and tools.