[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"article-kimi-code-cli-setup-pricing-workflow-guide-en":3,"article-related-kimi-code-cli-setup-pricing-workflow-guide-en":31,"series-ai-agent-c9aeda0b-adb4-437a-a88c-19a2c00df1c1":84},{"id":4,"slug":5,"title":6,"content":7,"summary":8,"source":9,"source_url":10,"author":11,"image_url":12,"cover_image":12,"category":13,"language":14,"translated_content":11,"related_article_id":15,"keywords":16,"key_takeaways":23,"views":27,"created_at":28,"published_at":29,"topic_cluster_id":30},"c9aeda0b-adb4-437a-a88c-19a2c00df1c1","kimi-code-cli-setup-pricing-workflow-guide-en","Kimi Code CLI setup, pricing, and workflow guide","\u003Cp data-speakable=\"summary\">Set up Kimi Code CLI, use its \u003Ca href=\"\u002Ftag\u002Fagent\">agent\u003C\u002Fa> workflow, and compare its cost and limits.\u003C\u002Fp>\u003Cp>This guide is for developers who want a terminal-based coding agent they can install, trust, and use on real projects. After following the steps, you will have Kimi Code CLI running locally, connected to an API source, and configured for safer day-to-day coding tasks.\u003C\u002Fp>\u003Cp>You will also know when to use Plan mode, how to keep context under control, and where Kimi Code fits against other terminal agents. The instructions below use the current Moonshot docs and \u003Ca href=\"\u002Ftag\u002Fgithub\">GitHub\u003C\u002Fa> repo for Kimi Code, plus the official install flow and configuration model.\u003C\u002Fp>\u003Ch2>Before you start\u003C\u002Fh2>\u003Cul>\u003Cli>Node.js 24.15.0+ if you want the npm install path.\u003C\u002Fli>\u003Cli>macOS, Linux, or Windows 11 with a terminal that supports a full TUI.\u003C\u002Fli>\u003Cli>Git for Windows if you plan to run Kimi Code on Windows.\u003C\u002Fli>\u003Cli>A Moonshot AI account and either a Kimi Code OAuth login or a Kimi Platform API key.\u003C\u002Fli>\u003Cli>Access to the official docs at \u003Ca href=\"https:\u002F\u002Fdocs.kimi.com\u002Fkimi-code\u002F\" target=\"_blank\" rel=\"noreferrer\">docs.kimi.com\u002Fkimi-code\u003C\u002Fa> and the GitHub repo at \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fkimi-code\" target=\"_blank\" rel=\"noreferrer\">github.com\u002FMoonshotAI\u002Fkimi-code\u003C\u002Fa>.\u003C\u002Fli>\u003Cli>A project directory you can safely edit with an AI agent.\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>Step 1: Install the Kimi Code binary\u003C\u002Fh2>\u003Cp>Goal: get the CLI onto your machine with the official installer or the Node-based package so you can start the agent from any project folder.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781161392221-tdcq.png\" alt=\"Kimi Code CLI setup, pricing, and workflow guide\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cp>Use the shell script if you want the fastest path and do not already manage Node.js. Use npm if you prefer a package-managed install and already meet the version requirement.\u003C\u002Fp>\u003Cpre>\u003Ccode># macOS \u002F Linux\ncurl -fsSL https:\u002F\u002Fcode.kimi.com\u002Fkimi-code\u002Finstall.sh | bash\n\n# Windows PowerShell\nirm https:\u002F\u002Fcode.kimi.com\u002Fkimi-code\u002Finstall.ps1 | iex\n\n# npm path\nnode --version\nnpm install -g @moonshot-ai\u002Fkimi-code\nkimi --version\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see the \u003Ccode>kimi\u003C\u002Fcode> command available and a version string when you run \u003Ccode>kimi --version\u003C\u002Fcode>. If you used the install script, the binary should also be on your \u003Ccode>PATH\u003C\u002Fcode>.\u003C\u002Fp>\u003Ch2>Step 2: Connect your Moonshot account\u003C\u002Fh2>\u003Cp>Goal: authenticate Kimi Code so it can access a model endpoint and start sessions in your projects.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781161383775-urx9.png\" alt=\"Kimi Code CLI setup, pricing, and workflow guide\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cp>Launch the CLI inside a repository and use the built-in login flow. Moonshot supports either OAuth device-code login or a Kimi Platform API key, which is useful if your team already manages keys centrally.\u003C\u002Fp>\u003Cpre>\u003Ccode>cd your-project\nkimi\n\u002Flogin\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see a successful login state in the TUI, and subsequent sessions should start without asking you to authenticate again. If you need to clear credentials later, use \u003Ccode>\u002Flogout\u003C\u002Fcode>.\u003C\u002Fp>\u003Ch2>Step 3: Start a project session\u003C\u002Fh2>\u003Cp>Goal: open a live coding session that can inspect files, run commands, and answer questions about the codebase.\u003C\u002Fp>\u003Cp>Once logged in, start from the root of the repo and ask Kimi Code to summarize the project structure. That first task helps the agent build context before it edits anything. You can also run one-off prompts without entering the full UI.\u003C\u002Fp>\u003Cpre>\u003Ccode>kimi -p \"Describe this project's directory structure\"\nkimi -C\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see the agent read files, search the repository, and return a short summary of the codebase. If the output mentions directories and key entry points, the session is working as intended.\u003C\u002Fp>\u003Ch2>Step 4: Configure safe agent behavior\u003C\u002Fh2>\u003Cp>Goal: keep the agent useful without giving it uncontrolled write access to your machine or repository.\u003C\u002Fp>\u003Cp>Use Plan mode for non-trivial changes, and keep approval prompts enabled for file writes and shell commands. If you want durable team instructions, generate an \u003Ccode>AGENTS.md\u003C\u002Fcode> file with \u003Ccode>\u002Finit\u003C\u002Fcode> and commit it to the repo. That gives every future session the same project briefing.\u003C\u002Fp>\u003Cpre>\u003Ccode>Shift-Tab   # toggle Plan mode\n\u002Finit       # generate AGENTS.md\n\u002Fcompact    # compress a long session\n\u002Ffork       # branch the session\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see the agent outline its intended steps before making edits when Plan mode is on. After \u003Ccode>\u002Finit\u003C\u002Fcode>, the repo should contain an \u003Ccode>AGENTS.md\u003C\u002Fcode> file that captures the project-specific guidance.\u003C\u002Fp>\u003Ch2>Step 5: Tune context and provider settings\u003C\u002Fh2>\u003Cp>Goal: keep long tasks responsive and make Kimi Code work with the model provider your team prefers.\u003C\u002Fp>\u003Cp>Kimi Code stores config and session data under \u003Ccode>~\u002F.kimi-code\u002F\u003C\u002Fcode> by default, and you can move that with \u003Ccode>KIMI_CODE_HOME\u003C\u002Fcode> if you need a custom location for CI or shared machines. The config file can also point to alternative providers, including \u003Ca href=\"\u002Ftag\u002Fopenai\">OpenAI\u003C\u002Fa>-compatible endpoints.\u003C\u002Fp>\u003Cpre>\u003Ccode># relocate config and session storage\nexport KIMI_CODE_HOME=\u002Ftmp\u002Fkimi-home\n\n# edit ~\u002F.kimi-code\u002Fconfig.toml to change providers\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see new session files in the location you chose, and the agent should continue to start normally. If you switch providers in the config, the CLI should still behave the same while using a different backend.\u003C\u002Fp>\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Metric\u003C\u002Fth>\u003Cth>Before\u002FBaseline\u003C\u002Fth>\u003Cth>After\u002FResult\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>SWE-bench Pro\u003C\u002Ftd>\u003Ctd>Open coding models below frontier levels\u003C\u002Ftd>\u003Ctd>Kimi K2.6 at about 58.6%\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Context window\u003C\u002Ftd>\u003Ctd>Typical smaller-repo context limits\u003C\u002Ftd>\u003Ctd>256K tokens\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Model scale\u003C\u002Ftd>\u003Ctd>Standard dense model sizing\u003C\u002Ftd>\u003Ctd>1T parameters, about 32B active per token\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Install friction\u003C\u002Ftd>\u003Ctd>Older Python-based CLI needed Python 3.13 and uv\u003C\u002Ftd>\u003Ctd>TypeScript rewrite installs with npm or a shell script\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003Ch2>Common mistakes\u003C\u002Fh2>\u003Cul>\u003Cli>Using YOLO mode on a real branch. Fix: keep Plan mode on until you trust the task, then approve writes one step at a time.\u003C\u002Fli>\u003Cli>Starting in a subdirectory with no repo context. Fix: launch Kimi Code from the project root so it can inspect the full tree and tools.\u003C\u002Fli>\u003Cli>Letting sessions grow forever. Fix: use \u003Ccode>\u002Fcompact\u003C\u002Fcode> when the conversation gets noisy, and \u003Ccode>\u002Ffork\u003C\u002Fcode> when you want a second approach.\u003C\u002Fli>\u003C\u002Ful>\u003Cul>\u003Cli>Installing with npm on an unsupported Node version. Fix: upgrade to Node.js 24.15.0 or use the official shell installer instead.\u003C\u002Fli>\u003Cli>Ignoring Windows shell requirements. Fix: install Git for Windows first so Kimi Code can use Git Bash, or set \u003Ccode>KIMI_SHELL_PATH\u003C\u002Fcode> if needed.\u003C\u002Fli>\u003Cli>Skipping project instructions. Fix: create and commit \u003Ccode>AGENTS.md\u003C\u002Fcode> so the agent has durable repo-specific guidance.\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>What's next\u003C\u002Fh2>\u003Cp>Once Kimi Code is installed and stable, the next step is to wire it into your team workflow with shared instructions, safer approval defaults, and a repeatable prompt pattern for bug fixes, refactors, and test-driven changes. If you want a deeper comparison, study how Kimi Code differs from \u003Ca href=\"\u002Ftag\u002Fclaude-code\">Claude Code\u003C\u002Fa> and \u003Ca href=\"\u002Ftag\u002Fgemini\">Gemini\u003C\u002Fa> CLI before standardizing on one agent for production use.\u003C\u002Fp>","Set up Kimi Code CLI, use its agent workflow, and compare its cost and limits.","lushbinary.com","https:\u002F\u002Flushbinary.com\u002Fblog\u002Fkimi-code-cli-developer-guide\u002F",null,"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781161392221-tdcq.png","ai-agent","en","3f5cef32-c57b-4355-80f5-09af8a117d96",[17,18,19,20,21,22],"Kimi Code","Moonshot AI","Node.js","terminal agent","AGENTS.md","SWE-bench Pro",[24,25,26],"Kimi Code CLI is a terminal-first coding agent that runs on Moonshot's Kimi K2.6 model.","The official install path is the quickest, while the npm path requires Node.js 24.15.0+.","Plan mode, AGENTS.md, and context compacting make the agent safer for real repositories.",0,"2026-06-11T07:02:28.34709+00:00","2026-06-11T07:02:28.337+00:00","a9bee732-b07c-4e5b-a0e6-3048577e32a7",{"tags":32,"relatedLang":43,"relatedPosts":47},[33,35,37,39,41],{"name":19,"slug":34},"nodejs",{"name":21,"slug":36},"agentsmd",{"name":18,"slug":38},"moonshot-ai",{"name":20,"slug":40},"terminal-agent",{"name":17,"slug":42},"kimi-code",{"id":15,"slug":44,"title":45,"language":46},"kimi-code-cli-setup-pricing-workflow-guide-zh","Kimi Code CLI 安裝、定價與工作流","zh",[48,54,60,66,72,78],{"id":49,"slug":50,"title":51,"cover_image":52,"image_url":52,"created_at":53,"category":13},"1a9879eb-d0c9-44f4-9faf-8bc25dab2016","windows-agent-runtime-not-human-desktop-en","Windows is becoming an agent runtime, not a human desktop","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781147875233-ah2r.png","2026-06-11T03:17:17.770392+00:00",{"id":55,"slug":56,"title":57,"cover_image":58,"image_url":58,"created_at":59,"category":13},"c0a961a9-23ca-49c4-a384-8bb5195b82e6","grok-updates-change-how-i-code-en","5 Grok updates that change how I code","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781126304211-brf6.png","2026-06-10T21:17:56.942433+00:00",{"id":61,"slug":62,"title":63,"cover_image":64,"image_url":64,"created_at":65,"category":13},"bb423260-5b39-4dda-b606-07991192c2ad","codex-chatgpt-work-code-assistant-en","Codex brings ChatGPT into work and code tasks","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781115482072-l1o5.png","2026-06-10T18:17:26.704133+00:00",{"id":67,"slug":68,"title":69,"cover_image":70,"image_url":70,"created_at":71,"category":13},"5efa67dd-b9f7-4a2f-8c68-3a4bc6a6b7d9","claude-code-dynamic-workflow-ai-harness-en","Claude Code 动态工作流：AI 自写 Harness","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781035372495-9czj.png","2026-06-09T20:02:22.33375+00:00",{"id":73,"slug":74,"title":75,"cover_image":76,"image_url":76,"created_at":77,"category":13},"2bd28e0e-0f4b-4987-a961-28763c1e1926","agent-orchestration-enterprise-ai-layer-en","Agent orchestration is the missing layer for enterprise AI","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1780984981174-08mj.png","2026-06-09T06:02:31.384174+00:00",{"id":79,"slug":80,"title":81,"cover_image":82,"image_url":82,"created_at":83,"category":13},"95684312-23dc-4a78-a917-df14d132c5fa","ai-agents-use-blockchain-trust-layer-en","AI agents use blockchain as a trust layer","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1780980506080-ki4s.png","2026-06-09T04:48:01.710214+00:00",[85,90,95,100,105,110,115,120,125,130],{"id":86,"slug":87,"title":88,"created_at":89},"03db8de8-8dc2-4ac1-9cf7-898782efbb1f","anthropic-claude-ai-agent-task-automation-en","Anthropic's Claude AI Agent: A New Era of Task Automation","2026-03-25T16:25:06.513026+00:00",{"id":91,"slug":92,"title":93,"created_at":94},"045d1abc-190d-4594-8c95-91e2a26f0c5a","googles-2026-ai-agent-report-decoded-en","Google’s 2026 AI Agent Report, Decoded","2026-03-26T11:15:23.046616+00:00",{"id":96,"slug":97,"title":98,"created_at":99},"e64aba21-254b-4f93-aa21-837484bb52ec","kimi-k25-review-stronger-still-not-legend-en","Kimi K2.5 review: stronger, still not a legend","2026-03-27T07:15:55.385951+00:00",{"id":101,"slug":102,"title":103,"created_at":104},"30dfb781-a1b2-4add-aebe-b3df40247c37","claude-code-controls-mac-desktop-en","Claude Code now controls your Mac desktop","2026-03-28T03:01:59.384091+00:00",{"id":106,"slug":107,"title":108,"created_at":109},"254405b6-7833-4800-8e13-f5196deefbe6","cloudflare-100x-faster-ai-agent-sandbox-en","Cloudflare’s 100x Faster AI Agent Sandbox","2026-03-28T03:09:44.356437+00:00",{"id":111,"slug":112,"title":113,"created_at":114},"04f29b7f-9b91-4306-89a7-97d725e6e1ba","openai-backs-isara-agent-swarm-bet-en","OpenAI backs Isara’s agent-swarm bet","2026-03-28T03:15:27.849766+00:00",{"id":116,"slug":117,"title":118,"created_at":119},"3b0bf479-e4ae-4703-9666-721a7e0cdb91","openai-plan-automated-ai-researcher-en","OpenAI’s plan for an automated AI researcher","2026-03-28T03:17:42.312819+00:00",{"id":121,"slug":122,"title":123,"created_at":124},"fe91bce0-b85d-4efa-a207-24ae9939c29f","harness-engineering-ai-agent-reliability-2026","Harness Engineering: From Bridle to Operating System, The Missing Link in AI Agent Reliability","2026-03-31T06:36:55.648751+00:00",{"id":126,"slug":127,"title":128,"created_at":129},"7a09007d-820f-43b3-8607-8ad1bfcb94c8","mcp-explained-from-prompts-to-production-en","MCP Explained: From Prompts to Production","2026-04-01T09:24:40.089177+00:00",{"id":131,"slug":132,"title":133,"created_at":134},"116d5ee9-a4f1-4b5a-aac5-5d035dd22bbe","amazon-bedrock-agents-multi-agent-workflows-en","Amazon Bedrock Agents Gets Multi-Agent Workflows","2026-04-01T09:30:30.197685+00:00"]