Overview of Kimi Code CLI

Moonshot AI has released Kimi Code CLI, an open-source terminal-based coding agent designed to assist with software development tasks such as feature implementation, bug fixing, and codebase exploration. Built in TypeScript, the tool is the successor to the original kimi-cli and is designed for long, focused agent sessions. It operates by reading and editing code, executing shell commands, searching files, and fetching web content.

Execution Model and Safety

The agent utilizes a feedback-driven execution model. It plans steps, executes code modifications or shell commands, and reports its actions. To maintain developer control, the agent performs read-only operations automatically but requires explicit user confirmation before executing file edits or shell commands. Advanced users can bypass these prompts using the --yolo flag for batch operations or utilize /fork to create experimental branches that can be easily abandoned.

Key Features and Workflow

  • Planning and Subagents: The agent supports a dedicated plan mode (accessible via Shift-Tab) to outline research before modifying files. For complex investigations, it can dispatch subagents in parallel.
  • Context Management: The /compact command allows users to compress context to optimize token usage during long sessions.
  • Integration: The tool supports the Model Context Protocol (MCP) via /mcp-config and integrates with IDEs like Zed and JetBrains through ACP.
  • Installation: It can be installed via a shell script (macOS/Linux) or PowerShell (Windows), or globally via npm (requires Node.js 24.15.0+). Users authenticate via /login using Kimi Code OAuth or a Moonshot AI Open Platform API key.