Moonshot AI releases KmCode CLI: a terminal AI coding agent built in TypeScript for the next generation of agents

by ai-intensify
0 comments
Moonshot AI releases KmCode CLI: a terminal AI coding agent built in TypeScript for the next generation of agents

Moonshot AI has been released km code cli, An open-source coding agent that runs in the terminal. The tool reads and edits code, runs shell commands, searches files, and fetches web pages. It then chooses its next step based on the feedback received. This project is MIT-licensed and available on GitHub.

KM Code CLI is the successor to the older KM-CLI. The new agent is written in TypeScript and distributed via npm. It works out-of-the-box with Moonshot AI’s KM model. It can also be configured to use other compatible providers.

What is kmcode CLI?

KmCode is an AI agent for CLI software development and terminal operation. It can implement new features, fix bugs, and complete refactors. It can also explore an unfamiliar codebase and answer architectural questions. Batch file processing, builds, and serial test runs are also supported.

The execution model is feedback-driven. The agent plans the steps, modifies the code, runs tests, and reports its actions. Read-only operations run automatically by default. For file editing or shell commands, the agent asks for confirmation first. This approval flow keeps risky tasks under developer control.

The CLI itself is free and MIT-licensed. Model access requires a Kimi Code OAuth or Moonshot AI Open Platform API key.

https://github.com/MoonshotAI/kimi-code

key features

Moonshot lists several features aimed at longer, focused agent sessions:

  • Single-binary distribution. One command installs it, which does not require Node.js setup.
  • Fast startup. Moonshot says the TUI is ready in milliseconds.
  • Purpose-built TUI. The interface is tuned for extended agent sessions.
  • Video input. Insert a screen recording or demo clip into a chat.
  • AI-native MCP configuration. Add and authenticate ModelContext Protocol Server /mcp-config.
  • Subagent for parallel work. built-in dispatch coder, exploreAnd plan Subagents in discrete contexts.
  • Lifecycle hook. Run local commands to trigger get tool calls, audit decisions, or notifications.

Installation and first run

Two installation paths exist. The official script does not require pre-installed Node.js.

On MacOS or Linux, run the install script:

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

On Windows, use Powershell:

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

Global npm install requires Node.js 24.15.0 or later:

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

Verify the binary, then open a project and start the interactive UI:

kimi --version
cd your-project
kimi

On first launch, type /login Inside the UI. You can choose Kimi Code OAuth or Moonshot AI Open Platform API key. To run a directive without UI, use kimi -p "your task". To resume a previous session, add -C.

use cases

  • understanding a project: Ask for an architecture overview and a module dependency diagram.
  • implement a feature: Describe signatures, options, and acceptance criteria in advance.
  • fix a bug: Explain symptoms, reproductive stages and expected behavior together.
  • Writing tests and refactoring: Remove repeated patterns, then run tests to confirm the behavior.
  • One-time Automation: Analyze logs and output call counts with p50 and p99 latency.
  • scheduled tasks: Ask the agent to set a reminder or recurring check via cron.

Available through planning mode Shift-Tab Or kimi --plan. It outputs a research plan before touching the files. For secure batch jobs, --yolo Or /yolo Leaves approval signals. /fork The command creates an experimental branch that you can drop. /compact The command compresses the context to free the token. For larger investigations, the main agent can dispatch subagents in parallel.

How does kmcode CLI compare

The KmCode CLI connects to many installed terminal coding agents. The table below compares it with three of them. Competitive details reflect mid-2026 and may change quickly.

Property km code cli cloud code OpenAI Codex CLI gemini cli
developer Moonshot AI anthropic OpenAI Google
support model km model cloud model gpt-5.3-codecs gemini 2.5 pro
language/runtime typescript node.js War typescript
to install Script or npm (Node.js ≥ 24.15.0) Native Installer or NPM npm/native npm single binary
mcp support Yes (/mcp-config) Yes Yes Yes
sub-agent Yes (coder, explore, plan) Yes Yes no (sequential)
planning mode Yes (Shift-Tab) Yes Yes Yes
IDE integration ACP (Jade, JetBrains) VS Code, JetBrains VS Code, IDE VS Code (Code Help)
license MIT property open source Apache 2.0

All four agent models support the Context Protocol. They differ on support models, languages, licenses, and orchestration. KM Code CLI and Codex CLI both ship native sub-agents. The Gemini CLI runs tasks sequentially without the support of subagents.

key takeaways

  • KmCode CLI is an MIT-licensed terminal coding agent from Moonshot AI.
  • It is written in TypeScript and installs via script or npm.
  • Made in coder, exploreAnd plan Subagents run in different contexts.
  • MCP servers are configured interactively /mcp-configNot raw JSON.
  • It replaces km-cli and migrates existing configuration and sessions.

MarketTechPost’s visual explainer


KM Code CLI Guide
01/09

overview

km code cli

Moonshot AI’s open-source terminal coding agent that reads code, runs commands, and plans its next step.

  • Runs as an AI coding agent in your terminal
  • MIT-licensed · Written in TypeScript · Distributed via npm
  • Works with KM models or other compatible providers

Slide 02

What is kmcode CLI?

  • Reads and edits code, runs shell commands, searches files
  • Brings up web page and chooses next step from feedback
  • Read-only actions run automatically by default
  • File editing and shell commands ask for confirmation first

Slide 03

key features

  • Single-binary distribution – no Node.js setup required
  • Made in coder, exploreAnd plan subagent
  • Via AI-native MCP configuration /mcp-config
  • Lifecycle hooks and video input support

Slide 04

to install

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

npm (node.js 24.15.0+)

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

Slide 05

first run

kimi --version
cd your-project
kimi
  • Type /login → KM Code OAuth or Moonshot API Key
  • kimi -p "your task" Runs a directive without UI
  • kimi -C Resumes previous session

Slide 06

use cases

  • Understand a Project: Architecture Overview and Dependency Map
  • Implement features with clear signatures and acceptance criteria
  • Fix bug with symptoms, reproduction steps and expected behavior
  • Write tests, refactor, and automate log analysis or batch editing

Slide 07

Modes and Commands

  • Planning Mode: Shift-Tab Or kimi --plan
  • --yolo Or /yolo Secure batch job approval leaves
  • /fork Creates an experimental branch that you can drop into
  • /compact Compresses the context to free the token

Slide 08

How does it compare

Property km code cli cloud code codex cli gemini cli
Sample km model cloud model gpt-5.3-codecs gemini 2.5 pro
Language typescript node.js War typescript
sub-agent Yes Yes Yes No
license MIT property open source Apache 2.0

Slide 09

key takeaways

  • MIT-licensed terminal coding agent from Moonshot AI
  • Written in TypeScript; Installs via script or npm
  • coder, explore, plan subagents in different contexts
  • MCP is configured interactively, not raw JSON
  • km-cli successful; Migrates configuration and sessions


check it out GitHub repo here. Also, feel free to follow us Twitter And don’t forget to join us 150k+ ml subreddit and subscribe our newsletter. wait! Are you on Telegram? Now you can also connect with us on Telegram.

Do you need to partner with us to promote your GitHub repo or Hugging Face page or product release or webinar, etc? join us


Michael Sutter is a data science professional and holds a Master of Science in Data Science from the University of Padova. With a solid foundation in statistical analysis, machine learning, and data engineering, Michael excels in transforming complex datasets into actionable insights.

Related Articles

Leave a Comment