Skip to content

Kimi Code cheatsheet

Lookup only. CLI: kimi command and kimi --help. Models / membership: models and membership.

Covers official pages opened on 2026-08-19. npm @moonshot-ai/kimi-code latest that day was 0.37.1. Run kimi --version and check the changelog.

Install

CaseCommand
macOS / Linux (recommended)curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
Windows PowerShellirm https://code.kimi.com/kimi-code/install.ps1 | iex
npm (Node ≥ 22.19.0)npm install -g @moonshot-ai/kimi-code
pnpmpnpm add -g @moonshot-ai/kimi-code
Versionkimi --version (-V)
Upgradekimi upgrade (alias kimi update)
npm upgradenpm install -g @moonshot-ai/kimi-code@latest
Homebrew upgradebrew upgrade kimi-code (What's New; Getting Started has no install text)
npm uninstallnpm uninstall -g @moonshot-ai/kimi-code

Windows: install Git for Windows first; custom Git Bash path → KIMI_SHELL_PATH.

Old https://code.kimi.com/install.sh (no kimi-code/) and uv tool install … kimi-cli are the Python line. Do not use them.

Main flags

Source: kimi command

FlagShortMeaning
--version-VPrint version
--help-hHelp
--session [id]-SResume; omit ID for a picker. Hidden alias -r / --resume
--continue-cResume latest session in this directory
--model <model>-mModel alias for this launch
--prompt <prompt>-pOne-shot, no TUI
--output-format <format>text or stream-json; only with -p
--yolo-yAuto-approve ordinary tools. Hidden aliases --yes, --auto-approve
--autoAuto permission; no questions
--planStart in Plan mode
--skills-dir <dir>Replace auto-discovered Skills dirs; repeatable
--agent <name>Main agent (not with --session/--continue)
--agent-file <path>Load an agent from Markdown
--add-dir <dir>Extra workdir; repeatable

Conflicts: --continue × --session; --yolo × --auto; -p cannot combine with --yolo / --auto / --plan. -p is locked to auto permission.

Subcommands

CommandRole
kimiNo args: new TUI session here
kimi loginNon-interactive OAuth device-code
kimi acpACP stdio for IDEs
kimi webForeground REST/WS + web UI. Default port 58627
kimi doctorValidate config.toml / tui.toml
kimi export [sessionId]Zip a session
kimi migrateImport old kimi-cli data
kimi upgradeCheck and install updates
kimi vis [sessionId]Visualize a session in the browser
kimi provider …Non-interactive provider admin

kimi server … is deprecated (exit 1). Use kimi web. Exception: kimi server kill only stops pre-0.28.0 background servers.

Slash commands (starter set)

Full list: slash-commands

CommandAliasRole
/loginOAuth or Platform key
/logoutClear current credentials
/modelSwitch model
/providerProvider manager
/new/clearNew session
/sessions/resumeResume history
/forkFork a copy
/compact [hint]Compress context
/initWrite AGENTS.md
/usageUsage / quota
/statusRuntime status
/yolo [on|off]/yesYOLO
/auto [on|off]Auto
/plan [on|off]Plan
/goal …Goal mode
/swarm <task>Multi-agent parallel
/btw [question]Side-channel subagent
/mcpMCP status
/mcp-configConfigure MCP (built-in skill)
/help/h /?Help
/exit/quit /qQuit

Keys

KeyAction
EnterSend
Shift-Enter / Ctrl-JNewline
EscInterrupt / close popup
Ctrl-CInterrupt; twice while idle exits
Ctrl-DExit when the input is empty
Shift-TabToggle Plan
Ctrl-SInterject while streaming
Ctrl-OCollapse tool output
Ctrl-GExternal editor
! (empty input)Shell mode
@File mention
/Slash command

Paste media: Ctrl-V on macOS/Linux, Alt-V on Windows.

VS Code extension

ItemValue
Marketplacemoonshot-ai.kimi-code
SearchKimi Code, publisher moonshot-ai
EligibilityProduct docs: new installs only for legacy Python CLI users
VS Code version (Marketplace)>= 1.100.0
Focus inputCtrl+Shift+K / Cmd+Shift+K
Insert current fileAlt+K
New conversationCtrl+N / Cmd+N (needs kimi.enableNewConversationShortcut)

Model IDs

Source: Models (3 IDs)

Model IDModelContextPlan
k3Kimi K3Moderato 256k; Allegretto+ up to 1MModerato+ (Andante not yet)
kimi-for-codingK2.7 Code256kAll members
kimi-for-coding-highspeedSame, high speed256kAllegretto+

A wrong high-speed ID silently falls back to the standard ID. Unauthorized → 401. Third-party 1M windows: set context to 1048576.

API

Kimi CodeOpen Platform
OpenAI Base URLhttps://api.kimi.com/coding/v1https://api.moonshot.cn/v1
Anthropic Base URLhttps://api.kimi.com/coding/
Billingmembership + rate limitsmetered
Create keyconsole (max 5, shown once)Open Platform console

Keys do not mix. Do not rewrite the User-Agent.

Paths and env

Key / pathRole
~/.kimi-code/Current data root
~/.kimi-code/config.tomlAgent / permissions / providers
~/.kimi-code/tui.tomlTheme, editor, notifications, auto-update
~/.kimi/Legacy Python CLI
KIMI_CODE_HOMEOverride data root
KIMI_SHELL_PATHWindows bash.exe
KIMI_DISABLE_TELEMETRY=1Disable anonymous telemetry (true/yes/y also work)

KIMI_API_KEY is not read from the shell.

Permission modes

ModeCLITUIBehavior
Default manual(no flag)Writes / shell ask first
Plan--planShift-Tab /planPlan first; leaving Plan still asks (even under YOLO)
YOLO--yolo -y/yoloAuto-approve ordinary tools
Auto--auto/autoFully automatic, no questions
-plocked to autoCannot stack yolo/auto/plan

High-quality sources

Unverified

  • Whether the product hub still shows a fourth model ID k3-256k (conflicted with the models page on 2026-08-19)
  • Official brew install text (only brew upgrade kimi-code is documented)
  • A dedicated Kimi Claw landing URL (the comparison page names the product, not a separate host)

Built for frontend engineers · Powered by VitePress