CLI Flags
Launch flags for the kimi terminal command (run kimi --help for the built-in list). These are shell flags, not in-TUI slash commands — see Terminal Commands (kimi) for that distinction.
Session
| Flag | Purpose | Example |
|---|---|---|
--session [id] (-S) | Resume a session; with an ID opens it directly, without an ID opens an interactive selector | kimi -S 3fa9… |
--continue (-c) | Continue the most recent session in the current directory | kimi -c |
--resume (-r) | Hidden alias for --session | kimi -r |
Models
| Flag | Purpose | Example |
|---|---|---|
--model <model> (-m) | Model alias for this launch; otherwise default_model from config is used | kimi -m k3 |
Permissions
| Flag | Purpose | Example |
|---|---|---|
--yolo (-y) | Start in Ask When Needed mode: routine operations run automatically, risky actions still ask | kimi -y |
--auto | Start in Never Ask mode (fully unattended) | kimi --auto |
--yes, --auto-approve | Hidden aliases for --yolo | kimi --yes |
See the safety warnings in Permissions and Approvals before using these.
Context
| Flag | Purpose | Example |
|---|---|---|
--add-dir <dir> | Extra workspace directory; repeatable; relative paths resolve against cwd | kimi --add-dir ../shared-lib |
Output
| Flag | Purpose | Example |
|---|---|---|
--output-format <format> | text (default) or stream-json; only valid with --prompt | kimi -p "…" --output-format stream-json |
Debugging
| Flag | Purpose | Example |
|---|---|---|
--version (-V) | Print version and exit | kimi -V |
--help (-h) | Show help and exit | kimi -h |
For deeper diagnostics use kimi doctor and kimi export (Terminal Commands (kimi)) and the KIMI_LOG_LEVEL env var (Configuration).
Automation
| Flag | Purpose | Example |
|---|---|---|
--prompt <prompt> (-p) | Non-interactive single prompt; streams assistant output to stdout; no TUI | kimi -p "fix the failing test" |
--plan | Start the new session in Plan mode | kimi --plan |
Non-interactive details: assistant text goes to stdout while thinking, tool progress, and resuming notices go to stderr; there is no human approval — the auto permission policy applies and static deny rules still apply; stream-json emits one JSON object per line.
Integrations
| Flag | Purpose | Example |
|---|---|---|
--skills-dir <dir> | Replace auto-discovered skill directories for this launch; repeatable | kimi --skills-dir ./team-skills |
--agent <name> | Start a new session with a named agent as the main agent | kimi --agent reviewer |
--agent-file <path> | Load one custom agent from a Markdown file for a new session; not repeatable | kimi --agent-file ./agents/reviewer.md |
For IDE integration there is the kimi acp subcommand rather than a flag; see Terminal Commands (kimi).
Conflict rules
Rejected at startup:
--continueand--sessionare mutually exclusive.--yoloand--autoare mutually exclusive.--promptcannot combine with--yolo/--auto/--plan(non-interactive mode already defaults to auto permission).--output-formatonly works with--prompt.--agentcannot combine with--session/--continue;--agent-filecannot combine with--agent,--session, or--continue.
? Unable to verify: whether --yolo/--plan can combine with --continue/--session when resuming. The kimi command reference says resuming can override the saved mode (e.g. kimi --continue --auto); the overrides page states --yolo and --plan cannot combine with --continue/--session in non-prompt mode. The two official pages conflict.
Last verified: 2026-09-07
Official sources:
- https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html
- https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/overrides.html
- https://www.kimi.com/code/docs/en/kimi-code-cli/guides/sessions.html
AI coding tools evolve quickly. If you find outdated information, please open an issue or pull request.