Kimi Code CLI Quick Reference

A Kimi Code CLI cheat sheet and quick reference covering commands, slash commands, keyboard shortcuts, built-in tools, Plan Mode, Skills, MCP, and everyday developer workflows.

8 min read2026-06-18
Kimi Code CLI interface preview

This quick reference collects the Kimi Code commands, slash commands, keyboard shortcuts, built-in tools, and daily workflows developers use most often. Keep it open next to your terminal, and use /help inside Kimi Code or kimi --help in your shell to check what your current version exposes.

Kimi Code CLI quick reference cheat sheet showing essential commands, slash commands, tools, and shortcuts

For upstream details, see the official kimi command, slash commands, built-in tools, and keyboard shortcuts references.

Start here

Use this minimum loop when you enter a project for the first time:

cd your-project kimi # Inside the session /login # sign in if this is your first launch /init # generate or refresh AGENTS.md /plan on # plan before broad, risky, or unclear work /help # discover commands and shortcuts /compact # free context when the conversation gets long

Use --yolo, /yolo, and /auto only in workspaces you trust. They reduce approval friction, but they also let Kimi Code act with more autonomy.

Install Kimi Code CLI

For most developers, the official install script is the quickest path: it installs a single Kimi Code binary and does not require Node.js. Homebrew, npm, and pnpm are also available if they better match your local toolchain.

Platform / managerCommand
macOS / Linux scriptcurl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
Homebrewbrew install kimi-code
Windows PowerShellirm https://code.kimi.com/kimi-code/install.ps1 | iex
npmnpm install -g @moonshot-ai/kimi-code
pnpmpnpm add -g @moonshot-ai/kimi-code

On Windows, install Git for Windows before first launch because Kimi Code CLI uses the bundled Git Bash as its shell environment. After installing, open a new terminal and verify the binary:

kimi --version

Launch & automation

Core CLI options

Command / FlagWhat it does
kimiStart an interactive session in the current directory
kimi --continue, kimi -CContinue the most recent session in this directory
kimi --session [id], kimi -S [id]Resume a session by ID, or open the session picker without an ID
kimi -p "...", kimi --prompt "..."Run a single non-interactive prompt without opening the TUI
--output-format stream-jsonEmit JSONL events for scripting; only works with --prompt
kimi --model <model>, kimi -m <model>Start with a specific model alias
kimi --planStart a new session in Plan Mode
kimi --yolo, kimi -yAuto-approve regular tool calls; use only in trusted directories
kimi --autoStart in auto permission mode; approvals are handled automatically and the Agent will not ask questions
--skills-dir <dir>Load Skills from the specified directory, replacing auto-discovered user and project skill directories for this launch

Non-interactive examples

kimi -p "Summarize the current repository status" kimi -m kimi-code/kimi-for-coding -p "Explain the latest diff" kimi -p "List changed files" --output-format stream-json

CLI subcommands

SubcommandPurpose
kimi loginStart Kimi Code OAuth device-code login without entering the TUI
kimi acpRun Kimi Code as an Agent Client Protocol server for IDE integration
kimi serverRun, install, and manage the local REST/WebSocket/web service
kimi webOpen Kimi's browser UI; equivalent to kimi server run --open
kimi doctorValidate config.toml and tui.toml
kimi export [sessionId]Package a session into a ZIP archive
kimi migrateMigrate local data from a legacy kimi-cli installation
kimi upgradeCheck for the latest version and display update options
kimi vis [sessionId]Launch the session visualizer in your browser
kimi providerManage providers from the terminal

Useful server commands:

kimi server run # start or reuse a local background server kimi server run --foreground # run attached to the terminal kimi server install # register an OS-managed service kimi server status # show installed / running / pid / port state kimi web # open the browser UI

Slash commands

Slash commands are built-in TUI controls. Type / in the input box to open command completion; aliases are matched too. If a /-prefixed input does not match a built-in command or Skill command, it is sent to the Agent as a regular message.

Account & configuration

CommandAliasPurpose
/loginSelect an account or platform and log in
/logoutClear credentials for the current account
/providerOpen the provider manager to view, add, and remove configured providers
/modelSwitch the LLM model used in the current session
/settings/configOpen the settings panel inside the TUI
/experiments/experimentalOpen the experimental feature panel
/permissionSelect a permission mode
/editorConfigure the external editor launched by Ctrl-G
/themeSwitch the terminal UI color theme

Session management

CommandAliasPurpose
/new/clearStart a fresh session, discarding the current context
/sessions/resumeBrowse historical sessions and switch to one
/tasks/taskBrowse the background task list
/forkFork a new session from the current conversation
/title [...]/renameShow or set the current session title
/compact [...]Compact conversation context; optional text hints what to preserve
/undo [n]Undo recent prompts from the active context
/reloadReload the session and apply latest config.toml and tui.toml settings
/reload-tuiReload only tui.toml UI preferences
/initAnalyze the codebase and generate AGENTS.md
/export-md [...]/exportExport the current session as Markdown
/export-debug-zipExport the current session as a debug ZIP archive

Modes & run control

CommandAliasPurpose
/yolo [on|off]/yesToggle YOLO mode; skips approval for regular tool calls when enabled
/auto [on|off]Toggle auto permission mode; approvals are handled automatically and questions are skipped
/plan [on|off]Toggle Plan Mode; simply toggling does not create an empty plan file
/plan clearClear the current plan
/swarm on|offTurn swarm mode on or off without sending a prompt
/swarm <task>Turn swarm mode on, send the task as a prompt, then turn swarm mode off after a normal turn
/goal [...]Start or manage an autonomous goal

Plan Mode is for broad, risky, or unclear work. It prioritizes exploration and planning before file changes.

Start editing immediately on a 40-file refactor without reviewing the plan.
Run /plan on, let Kimi Code inspect the project, review the proposed plan, then approve before changes are made.

Goal mode subcommands include /goal status, /goal pause, /goal resume, /goal cancel, /goal replace <objective>, /goal next <objective>, and /goal next manage.

Information & status

CommandAliasPurpose
/help/h, /?Show keyboard shortcuts and available commands
/btw [question]Open a side conversation in a forked sub-Agent
/usageShow token usage, context consumption, and quota information
/statusShow runtime state: version, model, working directory, permission mode, and more
/mcpList MCP servers and connection status
/pluginsOpen the plugin manager
/versionDisplay the Kimi Code CLI version
/feedbackSubmit product feedback
/exit/quit, /qExit Kimi Code CLI

Skills & extensions

CommandPurpose
/mcp-configConfigure MCP servers and handle MCP OAuth login
/custom-theme [...]Create or edit a custom TUI color theme
/update-configInspect or edit config.toml and tui.toml
/import-from-cc-codexImport Claude Code and Codex instructions, Skills, and MCP settings
/sub-skillDiscover and reorganize the local Skill inventory
/skill:name [extra text]Invoke an installed external Skill
/name [extra text]Shortcut for an external Skill when no system command has the same name
/parent.child [extra text]Invoke an external sub-skill exposed with a dotted command name

Built-in tools

Built-in tools are provided by Kimi Code CLI itself. Read-only tools such as Read, Grep, and Glob are auto-allowed by default; tools that write files, execute commands, stop tasks, or create schedules normally require approval unless your permission mode allows them.

Files, shell, and web

ToolDefault approvalPurpose
ReadAuto-allowRead text files
WriteRequires approvalCreate or overwrite files
EditRequires approvalReplace exact file content
GrepAuto-allowSearch file contents with ripgrep
GlobAuto-allowFind files by glob pattern
ReadMediaFileAuto-allowRead an image or video file
BashRequires approvalExecute shell commands
WebSearchAuto-allowSearch the web when available
FetchURLAuto-allowFetch the content of a specified URL

Planning, state, and collaboration

ToolDefault approvalPurpose
EnterPlanModeAuto-allowEnter Plan Mode
ExitPlanModeAuto-allow; user confirms the planExit Plan Mode and submit the plan
TodoListAuto-allowManage a visible task to-do list
AgentAuto-allowSpawn a sub-Agent for a focused subtask
AgentSwarmAuto-allow in swarm mode; otherwise may require approvalLaunch item-based subagents or resume existing subagents
AskUserQuestionAuto-allowAsk structured multiple-choice questions
SkillAuto-allowInvoke a registered inline Skill

Background and scheduled tasks

ToolDefault approvalPurpose
TaskListAuto-allowList background tasks
TaskOutputAuto-allowView the output of a background task
TaskStopRequires approvalStop a running background task
CronCreateRequires approvalSchedule a prompt to fire in the future
CronListAuto-allowList scheduled tasks
CronDeleteRequires approvalCancel a scheduled task

Keyboard shortcuts

Type /help inside the TUI for the shortcut list available in your current version. See the official Keyboard Shortcuts reference for the full upstream list.

General input

ShortcutAction
EnterSubmit the current input
Shift-Enter / Ctrl-JInsert a newline
/ Browse input history
EscClose a popup, cancel completion, or interrupt streaming / compaction
Ctrl-CInterrupt streaming output or clear the input box
Ctrl-DExit when the input box is empty

Mode switching and editing

ShortcutAction
Shift-TabToggle Plan Mode
Ctrl-GEdit the current input in an external editor
Ctrl-VPaste an image or video from the clipboard on Unix / macOS
Alt-VPaste an image or video from the clipboard on Windows
Ctrl--Undo input edit

During streaming and tool output

ShortcutAction
Ctrl-SSteer: inject the current input into the running turn
EscInterrupt the current streaming output
Ctrl-CInterrupt the current streaming output
Ctrl-OExpand or collapse tool output

Approval panel and popups

ShortcutAction
/ Move between approval options or scroll a popup
EnterConfirm the selected approval option; also closes help popups
19Select an approval option by number
Esc / Ctrl-C / Ctrl-DReject the current approval request
Ctrl-EExpand or collapse full diff or file preview content in the approval panel
PageUp / PageDownScroll a popup 10 lines at a time
q / QClose a popup

Common workflows

Start a new repo

cd your-project kimi /init /status

Plan a refactor before editing

/plan on Refactor the auth module to use the new token format and update all callers.

Run a background task

Run the test suite and report back when it finishes.

Then open /tasks to monitor background work, or let Kimi Code notify you when the task completes.

Resume yesterday's work

kimi --continue

If you need a specific session, run kimi --session or use /sessions inside the TUI.

Export or debug a session

/export-md /export-debug-zip kimi export -y

Conclusion

Kimi Code CLI works best when you treat it as a terminal teammate with explicit project context. Start with /init, use /plan for large or uncertain changes, watch long-running work with /tasks, keep /compact handy for long sessions, and choose a permission mode that matches the repository's trust level.

FAQ

Is Kimi Code CLI free to install?
Yes. Kimi Code CLI is open-source and free to install. Access to the underlying models or services may depend on your Kimi Code plan. See Kimi Code pricing for details.
Why is this page called a quick reference instead of only a cheat sheet?
Quick reference is the more official, documentation-style label. The page still covers the same cheat-sheet use case: copy-paste commands, slash commands, shortcuts, tools, and workflows in one place.
Do I need Node.js to install Kimi Code CLI?
The official install scripts do not require Node.js. npm and pnpm installation methods require a Node.js environment because they use JavaScript package managers.
What is the difference between `/plan` and normal mode?
Normal mode lets the Agent work directly. Plan Mode is for broad, risky, or unclear work: Kimi Code explores first, writes a plan, and exits after the plan is approved.
How do I resume a previous session?
Run kimi --continue in the same project directory to continue the most recent session. Use kimi --session [id] in the shell or /sessions inside the TUI to choose a specific session.
Is `--yolo` safe?
--yolo skips approval for regular tool calls. Use it only in trusted, version-controlled workspaces. For unfamiliar repositories or production data, keep approvals on.
How do Skills and MCP fit into Kimi Code?
Skills package reusable workflows and can appear as slash commands. MCP connects Kimi Code to external tools and data sources. Use /skill:name, /mcp, and /mcp-config to discover and configure them.