* fix(reload): re-inject plugin session-start reminder after /reload Reload reloaded plugins and resumed the session, but the model kept seeing the stale plugin session-start reminder from before the reload, so plugin skill changes only took effect in a fresh session. Append a fresh plugin_session_start reminder to the main agent after reload, gated on a new forcePluginSessionStartReminder flag that only the explicit /reload command sets, so config and experiment toggles that reuse the reload RPC do not spam the transcript. * fix(reload): keep reload result fresh and neutralize stale plugin reminder Append the plugin session-start reminder before constructing ResumeSessionResult so SDK callers reading getResumeState() see the refreshed plugin context instead of a pre-reload snapshot. When a plugin with a prior plugin_session_start reminder is disabled or removed, append a neutralizing reminder so the model does not keep following stale plugin instructions. * fix(reload): neutralize stale plugin reminder after compaction A full compaction folds the discrete plugin_session_start reminder into a compaction_summary, so the origin-only scan no longer detects it. Also treat a compaction_summary in history as a signal to neutralize, so disabling or removing a plugin after compaction still emits a superseding 'no active plugin session starts' reminder. * fix(reload): thread plugin reminder option through KimiHarness.reloadSession KimiHarness.reloadSession is a public SDK entry point; forward forcePluginSessionStartReminder to both the active-session and RPC reload paths so SDK callers using the harness can opt into the refreshed plugin reminder too. |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| test | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| package.json | ||
| README.md | ||
| tsconfig.dev.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| tsdown.native.config.ts | ||
| vitest.config.ts | ||
@moonshot-ai/kimi-code
The Starting Point for Next-Gen Agents
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_PATHto the absolute path ofbash.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, andplansubagents 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
- Full docs: https://moonshotai.github.io/kimi-code/en/
- 中文文档: https://moonshotai.github.io/kimi-code/zh/
- Getting Started: https://moonshotai.github.io/kimi-code/en/guides/getting-started
Repository & Issues
- Source: https://github.com/MoonshotAI/kimi-code
- Issues: https://github.com/MoonshotAI/kimi-code/issues
- Security: see SECURITY.md in the main repository
License
MIT