Kimi Code Cheat Sheet
Start
kimi # start interactive TUI
kimi -c # continue most recent session in this directory
kimi -S [id] # resume a session by ID, or pick interactively
Session
/new # fresh session, discards current context (alias: /clear)
/sessions # browse/restore historical sessions (alias: /resume)
/fork # fork current session preserving full history
/undo [n] # undo recent prompts (not code changes)
/exit # exit (aliases: /quit, /q)
Context / Compact
/compact [instruction] # compact context, optional hint of what to preserve
/init # analyze codebase and generate AGENTS.md
/status # version, model, cwd, permission mode
/usage # token usage, context consumption, quota
AGENTS.md at the project root is injected as project instructions; global instructions live in ~/.kimi-code/AGENTS.md and ~/.agents/AGENTS.md.
Plan
/plan [on|off] # toggle Plan mode
/plan clear # clear current plan
Or press Shift-Tab to toggle Plan mode. Start in Plan mode with kimi --plan.
Goal
/goal <objective> # persistent objective across auto-continuing turns
/goal status # show goal, elapsed time, turns, tokens
/goal pause # pause the current goal
/goal cancel # cancel the current goal
Review
No direct equivalent verified.
Permissions
Three modes: Always Ask (manual, default; every edit/command asks), Ask When Needed (yolo; routine ops auto, risky still asks), Never Ask (auto; fully unattended).
/permission # select permission mode
/yolo # switch to Ask When Needed (alias: /yes)
/auto # switch to Never Ask
kimi --yolo # start in Ask When Needed mode
kimi --auto # start in Never Ask mode
Warning:
--yoloskips approval for regular tool calls including file writes and shell commands — use only in trusted working directories.--autois fully unattended: the agent never asks and dangerous commands run without interruption.
Configuration
~/.kimi-code/config.toml # main config (KIMI_CODE_HOME relocates the data root)
~/.kimi-code/tui.toml # TUI preferences
/settings # settings panel in the TUI (alias: /config)
/reload # apply latest config.toml and tui.toml without restart
kimi doctor # validate config.toml / tui.toml without the TUI
MCP
MCP servers are configured in mcp.json, not config.toml: ~/.kimi-code/mcp.json (user) and .kimi-code/mcp.json (project; project wins on name conflicts).
/mcp # list MCP servers and connection status
/mcp-config # add/edit/delete servers, MCP OAuth login
{
"mcpServers": {
"filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] },
"linear": { "url": "https://mcp.linear.app/mcp" }
}
}
Non-interactive
kimi -p "summarize this repo" # one-shot, streams to stdout
kimi -p "query" --output-format stream-json # JSONL output
Runs with auto permission (no approval prompts); static deny rules still apply. Goal-mode exit codes: 0 complete, 3 blocked, 6 paused.
Last verified: 2026-09-07
AI coding tools evolve quickly. If you find outdated information, please open an issue or pull request.