How to Switch From Claude Code to Kimi K3 With OpenCode (Step by Step)
Claude Code is brilliant, but the subscription that makes it useful isn’t cheap. This week Moonshot AI released Kimi K3, a model that goes toe to toe with the big American models on coding, and you can run it through OpenCode, a free open source tool that works almost exactly like Claude Code. Cheapest route: about $10 a month.
If you can install an app and copy and paste, you can do this. It takes about 20 minutes.
The three pieces
- Kimi K3 is the brain: the AI model, launched 16 July 2026, able to hold around 750,000 words of your project at once.
- OpenCode is the app: it reads your files, writes code and runs commands, just like Claude Code, with whichever brain you plug in.
- VS Code or Warp is the window you type into.
You’re swapping the brain and the app. How you work stays the same: type what you want in plain English.
Step 1: Pick your window
Both are free, either works. If in doubt, pick VS Code.
- VS Code is the world’s most popular code editor, best if you also want to see the files. Open its terminal with View then Terminal, or Cmd and the backtick key (Ctrl and backtick on Windows).
- Warp is a modern terminal with AI features and its own file browser built in, if you’d rather work in one clean window. (That’s a referral link; it costs you nothing and I get a small credit.)
Step 2: Install OpenCode
On Mac or Linux, open your terminal, paste this and press Enter:
curl -fsSL https://opencode.ai/install | bash
On Windows, the easiest route is npm, which comes with Node.js (install that first if you don’t have it). Open your terminal and run:
npm install -g opencode-ai
If you already use a Windows package manager, these work too:
choco install opencode
scoop install opencode
(OpenCode’s docs also suggest WSL, a way of running Linux inside Windows, for the smoothest experience, but it’s not required and the npm route is fine to start with.)
Whichever you used, refresh your terminal so it picks up the new command. The simplest way is to close the terminal and open a new one. On Mac or Linux you can instead run this in the same window:
source ~/.zshrc
(If that says the file doesn’t exist, you’re likely on Linux using bash, so run source ~/.bashrc instead.)
Then check it worked:
opencode --version
A version number back means you’re done here.
Step 3 (VS Code only, optional): Add the OpenCode extension
Warp users, skip straight to Step 4, this one doesn’t apply to you. If you’re in VS Code it’s optional but worth a minute: OpenCode has an official extension for VS Code (it works in Cursor, Windsurf and VSCodium too), and the install is delightfully lazy: open the terminal inside VS Code, run opencode once, and the extension installs itself. If that doesn’t happen, search for “OpenCode” in the Extensions marketplace and click Install.
It’s worth having for three things:
- Cmd+Esc (Ctrl+Esc on Windows) opens OpenCode in a split view, and Cmd+Shift+Esc (Ctrl+Shift+Esc) starts a fresh session.
- It automatically shares whatever file or text you have selected, so “fix this” means the thing you’re looking at.
- Cmd+Option+K (Ctrl+Alt+K on Windows) drops a reference to the current file and lines straight into your prompt.
Step 4: Get access to Kimi K3
The only part that costs money, and you’re paying for the model, not OpenCode, same as Claude Code was free but the Claude subscription wasn’t. Two options:
- OpenCode Go, the easy one: $5 for your first month, then $10 a month, Kimi K3 and a stack of other good models included. That’s my referral link, which gets us both $5 of credit, so your first month is effectively free.
- A Kimi Code membership, straight from the source: subscribe on the Kimi pricing page (plans start at about $19 a month) and Kimi officially supports using it with OpenCode, alongside Claude Code and Roo Code. Better still, subscribe through my referral link and Kimi gives us both bonus membership credits, up to a year’s worth. Once subscribed, create an API key in the Kimi Code console. An API key is just a long password you’ll paste into OpenCode in a minute; you can have up to 5, and each one is shown only once when you create it, so save it somewhere safe. Depending on your plan you get roughly 300 to 1,200 requests every 5 hours, which is plenty for a normal working day.
Step 5: Connect OpenCode to Kimi
opencode auth login
Pick your provider with the arrow keys (or start typing to search): OpenCode if you went with Go, or Kimi For Coding if you have a Kimi membership. The Kimi For Coding option will then ask for your API key: paste the one you created in Step 4, press Enter, and that’s the whole job, it comes preloaded with Kimi’s coding endpoint. Either way you only do this once.
Step 6: Point it at your project
In VS Code, open your project folder (File then Open Folder) and run opencode in the terminal. In Warp, type cd and a space, drag your folder onto the window, press Enter, then run opencode.
- Type
/modelsand pick Kimi K3. - Type
/initthe first time in a project, so the AI reads it and writes itself a cheat sheet. - Ask for what you want, in plain English, exactly like Claude Code.
Tips
- The cheaper Kimi K2.7 Code model handles everyday jobs well and both routes include it. Switch any time with
/models. - This lives happily alongside Claude Code, so compare them on the same project before cancelling anything.
- Stuck? The answer is nearly always in the OpenCode docs or the Kimi Code help centre.
That’s it: a Claude Code style setup, a brand new frontier model, and your AI bill down to a tenner a month. And if you’d rather hand the whole build to someone who works this way every day, that’s what I do.