Short answer
Install Kimi Code CLI with omarchy pkg add kimi-code, then run kimi and type /login to pick Kimi Code OAuth or a Kimi Platform API key. The CLI is free and MIT licensed; model access is not free — OAuth draws on a Kimi membership (there is a $0 free tier), and a Platform API key bills per token.
Kimi Code CLI on Omarchy
Kimi Code CLI is Moonshot AI’s MIT-licensed terminal coding agent: a single binary with a fast purpose-built TUI, subagents, MCP support, and editor integration through ACP, running Kimi K2.7 Code by default.
TL;DR
omarchy pkg add kimi-code
cd ~/my-project
kimi
That installs Kimi Code CLI v2.7.3-1 (61.8 MB download, 194 MB installed, depends on glibc and gcc-libs). On first launch, type /login and pick Kimi Code OAuth or a Kimi Platform API key. Then describe what you want done.
Getting started (5 minutes)
1. Launch and log in.
Change into a project directory and run kimi. On first launch, type /login to begin the login flow. You get two choices: Kimi Code OAuth, a device-code flow where you open a link on any device, sign in, and enter the code to authorize (this bills against your Kimi membership), or a Kimi Platform API key from platform.kimi.com or platform.kimi.ai (this bills per token). To sign out, type /logout. Do not skip login: without it, your first prompt fails before the agent starts.
2. Start with a read-only task.
Try: “Take a look at this project and explain its main directories.” Kimi reads and searches the project before answering, so you see how it works before it edits anything. Then run /init to have it read the codebase and write an AGENTS.md with your project conventions. Note that /init only works in an interactive session.
3. Three things worth doing in the first session:
- Switch models with
/model. The default is Kimi K2.7 Code, Moonshot’s agentic coding model. You can also point the CLI at another provider entirely (Anthropic, OpenAI, Google GenAI, or Vertex AI) by editing~/.kimi-code/config.toml. - Add MCP servers conversationally. Type
/mcp-configand describe the server you want; Kimi adds, edits, and authenticates MCP servers without hand-editing JSON. MCP servers live inmcp.jsonunder~/.kimi-code/. - Use subagents for parallel work. Dispatch the built-in
coder,explore, andplansubagents in isolated contexts while keeping the main conversation clean. Sessions are resumable with/sessions, andkimi webserves a browser UI from a local server bound to 127.0.0.1.
4. Config location.
Local data lives under ~/.kimi-code/ by default (config files, session records, logs, update cache). Main config is ~/.kimi-code/config.toml, project overrides go in <project-root>/.kimi-code/local.toml (gitignore that file), and UI preferences live in tui.toml. Move the whole data directory with the KIMI_CODE_HOME environment variable.
Common issues & fixes
kimi mcp add returns “unknown command ‘mcp’”
Nothing is broken: Moonshot publishes two builds that both install a command named kimi, and the mcp subcommand belongs to the other one, the legacy Python kimi-cli. In Kimi Code CLI (this package), there is no kimi mcp subcommand. If you followed an old tutorial, check which repo it points to: anything written before kimi-code existed describes kimi-cli. (Decodo guide)
Fix: Add MCP servers with /mcp-config inside the TUI, or edit mcp.json by hand.
Login works, but every request fails with a 401
The three login routes are not interchangeable, and the keys are not either. A Kimi Code Console key targets api.kimi.com/coding/v1. A key from platform.kimi.ai targets api.moonshot.ai/v1 and returns 401 on the coding base, and a key from platform.kimi.com targets api.moonshot.cn/v1. Logging into one build does not log you into the other, so a legacy kimi-cli login does not carry over. (Decodo guide)
Fix: Use the key from the console you actually created it in, and re-run /login if you mixed them up.
The agent’s built-in fetch tool returns nothing, or a 403
This is a known limit of the FetchURL tool, not a rendering bug. It has no proxy rotation, no CAPTCHA handling, and no session management, and it identifies itself with a hardcoded Chrome user agent from 2021, so bot-protected pages (Cloudflare challenges, g2.com, zillow.com) return 403 or an empty shell. On an undefended page it works fine. (Decodo guide)
Fix: For defended targets, give the agent a scraping endpoint or an MCP data server instead of asking FetchURL to fight bot detection.
Slash commands like /init do nothing in non-interactive mode
Most slash commands do not work with -p (non-interactive print mode), so /init writes nothing even though the answer suggests it worked. Also note that -yolo cannot be combined with -p: the command fails outright rather than degrading gracefully. (Decodo guide)
Fix: Run /init in an interactive session instead. Pre-approve what CI needs with permission rules in config.toml instead of combining -yolo with -p.
The docs disagree about which Node.js version you need
The README says Node.js 24.15.0 or later, but the published package’s engines field declares Node.js 22.19.0 or later, and an open issue tracks the contradiction. The getting-started page agrees with the package (22.19.0). This mostly bites npm installs: the Omarchy package installs the standalone single binary, which needs no Node.js at all. (Backgrind install guide)
Fix: If you do install with npm, use Node.js 22.19.0 or later and treat the README’s higher number as unverified.
Pairs well with / If you hate this, try
Pairs well with
- Zed or JetBrains through ACP (
kimi acplets the editor drive a session directly, with no extra login),git(review diffs before committing), and a Kimi membership if you use it daily.
If you hate this, try
kilocode-cli— lets you pick from 500+ models including local Ollama models, if you want model choice over a single-vendor default; orfreebuff, which needs no login or key at all. If you want the same terminal-agent shape from Anthropic’s own models, Claude Code is the paid reference point.
Comparison: Kimi Code CLI vs Claude Code vs Kilo Code CLI vs Freebuff
| Kimi Code CLI | Claude Code (CLI) | Kilo Code CLI | Freebuff | |
|---|---|---|---|---|
| Price | Free CLI; Kimi membership from $15/mo or per-token API billing | Requires Claude Pro $20/mo+ | Free agent; you pay provider rates | Free; ads pay the bill |
| Best for | A fast single-binary TUI with subagents, MCP, and editor integration | The strongest single-vendor models, no key juggling | Picking your own model per task, local models, scripted runs | Zero setup, zero spend, no API key |
| Omarchy install | omarchy pkg add kimi-code | npm install -g @anthropic-ai/claude-code | omarchy pkg add kilocode-cli | omarchy pkg add freebuff |
Verdict: Pick Kimi Code CLI if you want a polished, fast-starting terminal agent and you are happy with Moonshot’s Kimi models as the default, with other providers available in config. Pick Kilo Code CLI if model choice matters more than polish, and Freebuff if you want to pay nothing at all.
How to switch from Claude Code (~15 minutes per project)
- Export from Claude Code: your project instructions already live in
CLAUDE.md. Kimi Code CLI readsAGENTS.md(and.kimi-code/AGENTS.md); copy the contents across or run/initand let it generate one from the codebase. - Import into Kimi: move MCP servers into Kimi’s
mcp.json(or add them with/mcp-config), and skills into.kimi-code/skills/asSKILL.mdfiles with frontmatter. Hooks go inconfig.tomlas[[hooks]]entries. - What doesn’t transfer: chat history, Claude-specific slash commands and permissions modes (Kimi has its own permission modes: default, acceptEdits, plan, auto, dontAsk, bypassPermissions), and Claude Code’s GitHub Actions integration.
Open the Kimi Code CLI package
See the live version, upstream screenshot, requirements, source and exact Omarchy install command.
Frequently asked questions
Is Kimi Code CLI free?
The CLI itself is free and MIT licensed. Model access is not free: OAuth login draws on a Kimi membership (there is a $0 free tier, with Kimi Code available on it), and a Platform API key bills per token. Check kimi.com pricing for current rates.
What is the difference between kimi-code and kimi-cli?
They are two builds from Moonshot that both install a kimi command. kimi-cli is the older Python build (last release 1.49.0); its own README says it is evolving into Kimi Code CLI and will be wound down, and Homebrew has marked its formula deprecated with a disable date of January 17, 2027. kimi-code is the current TypeScript build, the one linked from kimi.com/code, and the one this guide covers. Install kimi-code, not kimi-cli.
Do I need Node.js?
No, not with the Omarchy package: it installs the standalone single binary. Node.js is only needed for the npm install path (npm install -g @moonshot-ai/kimi-code, Node.js 22.19.0 or later).
Where does Kimi Code CLI store its config?
Local data lives under ~/.kimi-code/ by default (config files, session records, logs, update cache). Main config is ~/.kimi-code/config.toml, project overrides go in <project-root>/.kimi-code/local.toml (gitignore that file), and UI preferences live in tui.toml. Move the whole data directory with the KIMI_CODE_HOME environment variable.
Does it work offline or run a model locally?
No. Every prompt goes to a model provider over the network, whether that is Moonshot or a provider you configured in config.toml. There is no bundled local model.
Can I use Claude or GPT models with it?
Yes. config.toml supports Anthropic, OpenAI, the OpenAI Responses API, Google GenAI, and Vertex AI protocols, and the kimi provider catalog add command can import providers from the public models.dev catalog. Kimi models are just the default.
I used the old kimi-cli. Does anything carry over?
Yes, with one command: kimi migrate copies config.toml, MCP server entries, skills, and input history from the legacy ~/.kimi/ directory into ~/.kimi-code/. OAuth credentials, MCP authorizations, and legacy plugins are outside its scope, so log in again and re-authorize each server after migrating.
Official sources
- omarchyapps.com app page — kimi-code 2.7.3-1, 61.8 MB download, 194 MB installed, MIT, updated 2026-11-23
- Kimi Code README (install, quick start, /login, features, ACP)
- Kimi Code getting-started docs (install script, npm, first launch, /login, config paths)
- Kimi Code getting-started on kimi.com (OAuth vs API key, config.toml, other providers)
- Kimi membership pricing (Free $0, Plus $15/mo, Pro $31/mo, Max $79/mo, Ultra $159/mo; Kimi Code on all tiers)
- Decodo — kimi-code vs kimi-cli, kimi mcp confusion, FetchURL limits, key mixups, -p limits
- Backgrind — install methods, Node version contradiction, pricing meters, config locations
- DEV — beginner guide (single binary, /login, config, ACP, plugin marketplace)
- Review (K2.7 Code default model, successor to kimi-cli, features)
Commands and fixes verified against official sources November 2026; on-machine verification pending.