kimi-code/apps/kimi-code
7Sageer 26dd6ce6ae
fix(telemetry): deduplicate session_started and model switch events (#3499)
* fix(telemetry): deduplicate session_started and model switch events

* fix(telemetry): keep engine session_started for direct v2 SDK clients and avoid model_switch race

* fix(telemetry): preserve model_switch when activation rebinds the same alias

* fix(telemetry): route TUI reload through harness

* test: update /reload message-flow test for harness reload route
2026-09-03 16:49:27 +08:00
..
dist-web chore: sync web dist from code-app (#3454) 2026-09-02 13:33:02 +08:00
scripts fix(migration-legacy): faithfully migrate kimi-cli user data into kimi-code (#3446) 2026-09-02 11:32:23 +08:00
src fix(telemetry): deduplicate session_started and model switch events (#3499) 2026-09-03 16:49:27 +08:00
test fix(telemetry): deduplicate session_started and model switch events (#3499) 2026-09-03 16:49:27 +08:00
.gitignore feat(minidb): persistent index generations and lifecycle hardening (#2604) 2026-08-04 20:38:42 +08:00
AGENTS.md fix(kimi-code): close pre-trust-gate bare command resolution on Windows (#2695) 2026-08-11 12:53:52 +08:00
CHANGELOG.md ci: release packages (#3456) 2026-09-02 17:18:07 +08:00
package.json ci: release packages (#3456) 2026-09-02 17:18:07 +08:00
README.md
tsconfig.dev.json
tsconfig.json
tsdown.config.ts
tsdown.dist-worker.config.ts feat: isolate the full-text search index from the session index and the main thread (#2701) 2026-08-07 07:38:16 +08:00
tsdown.native.config.ts
tsdown.worker.config.ts feat: isolate the full-text search index from the session index and the main thread (#2701) 2026-08-07 07:38:16 +08:00
vitest.config.ts

@moonshot-ai/kimi-code

The Starting Point for Next-Gen Agents

npm License Docs

What is Kimi Code CLI

Kimi Code CLI is an AI coding agent that runs in your terminal. It can read and edit code, run shell commands, search files, fetch web pages, and choose the next step based on the feedback it receives. It works out of the box with Moonshot AI's Kimi models and can also be configured to use other compatible providers.

Install

The recommended install path is the official script. It does not require Node.js to be installed first.

  • macOS / Linux:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
  • Windows (PowerShell):
irm https://code.kimi.com/kimi-code/install.ps1 | iex

On Windows, install Git for Windows before first launch because Kimi Code CLI uses the bundled Git Bash as its shell environment. If Git Bash is installed in a custom location, set KIMI_SHELL_PATH to the absolute path of bash.exe.

Then run it with a new Terminal session:

kimi --version

Alternative: npm

If you prefer npm, use Node.js 22.19.0 or later:

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

Or with pnpm:

pnpm add -g @moonshot-ai/kimi-code

For upgrade and uninstall instructions, see the Getting Started guide.

Quick Start

Open a project and start the interactive UI:

cd your-project
kimi

On first launch, run /login inside Kimi Code CLI and choose either Kimi Code OAuth or a Kimi Platform API key. After login, try a first task:

Take a look at this project and explain the main directories.

Key Features

  • Single-binary distribution. Install with one command — no Node.js setup, no PATH gymnastics, no global module conflicts.
  • Blazing-fast startup. The TUI is ready in milliseconds, so opening a session never feels heavy.
  • Polished TUI. A carefully tuned interface designed for long, focused agent sessions.
  • Video input. Drop a screen recording or demo clip into the chat — let the agent watch instead of typing out what's hard to describe in words.
  • AI-native MCP configuration. Add, edit, and authenticate Model Context Protocol servers conversationally via /mcp-config — no hand-editing JSON.
  • Subagents for focused, parallel work. Dispatch built-in coder, explore, and plan subagents in isolated context windows; the main conversation stays clean.
  • Lifecycle hooks. Run local commands at key points — gate risky tool calls, audit decisions, fire desktop notifications, wire into your own automation.

Documentation

Repository & Issues

License

MIT