OpenCode + Kimi K3

Open-source coding agent + Kimi as the model — levelsio’s “install with Codex, connect Kimi, fewer permission blocks” recipe

← AI Agents  ·  AI  ·  Tech  ·  Kimi / Moonshot talk  ·  Claude Code  ·  Codex / ChatGPT

Source & Credit

Setup walkthrough from @levelsio (Pieter Levels):

How to code with Kimi K3 (better than Fable and no restrictions) today: ask Codex or Claude Code to install OpenCode → Kimi account + API key → OpenCode /connect to Kimi Code → BUILD mode + optional bypass permissions.

Original post: x.com/i/status/2078097783140053340 · Earlier note that OpenCode + Kimi was working after OpenRouter hit “rate limited upstream”: x.com/i/status/2078093365455790526

Official OpenCode: opencode.ai · docs: opencode.ai/docs · GitHub: anomalyco/opencode

Why This Page Exists

Levelsio’s pitch: he wants a coding agent that doesn’t “block him every 5 minutes” the way Claude Code did on some of his tasks (browser/Windows XP experiments, even health questions triggering lectures). He got OpenCode talking to Kimi K3 by using a direct Kimi API key after OpenRouter rate-limited.

That is his experience and product preference — not a universal ranking of models. Treat this as a practical alternate stack: open agent shell + paid Kimi Code membership (~$19/mo as he quoted) when you want multi-provider freedom.

Should You Install OpenCode via Codex on a Mac Mini?

Yes — that’s a valid (and intentional) path. Levelsio’s step 1 is literally: ask Codex or Claude Code to install OpenCode. On a Mac Mini that already runs agents (Claude Code, Codex, OpenClaw, etc.), that is fine.

  • Let Codex install it if you want hands-off setup: “Install OpenCode via the official install script or Homebrew and verify opencode --version.”
  • Install yourself if you prefer to see every shell command (recommended the first time on a machine you care about).
  • Either way, you still create the Kimi account, pay membership, and paste the API key — don’t put secrets in public repos or chat logs.

Mac Mini tip: install system-wide (Homebrew or the install script into your user path), then use OpenCode from Terminal or your agent session in the same project folders you already use for Claude/Codex. Same “agents live on the mini” pattern as SSH + VPS / agent desk setups — the mini is just the always-on host.

What Is OpenCode?

OpenCode is an open-source AI coding agent (terminal TUI/CLI; also desktop apps). Free models can be included; you can also connect providers (Claude, GPT, Gemini, Kimi, etc.). Think of it as a Claude Code–class shell that is not locked to one lab’s product policy surface.

Kimi (Moonshot) is the model/API side in levelsio’s recipe — specifically “Kimi Code” console + membership for an API key he pastes into OpenCode.

Levelsio’s Recipe (Quick Path)

  1. Install OpenCode — ask Codex or Claude Code, or run the official installer yourself (below).
  2. Kimi account — go to kimi.com, sign up, pay membership (he cited $19/mo; confirm current pricing on site).
  3. API key — get a key from kimi.com/code/console.
  4. Connect — run OpenCode, use /connect, choose Kimi Code, paste the API key.
  5. Modes / permissions — he recommends BUILD mode (Shift+Tab) and setting bypass permissions in /settings (same posture he uses in Claude Code). Only do this if you accept the risk of unsupervised shell/tool use on that machine.

He tried OpenRouter first and hit “rate limited upstream” (upstream = Kimi). Direct Kimi membership + key avoided that path for him.

Official Install Options (Mac / Mac Mini)

From OpenCode docs / GitHub (verify before running):

# Install script (common “YOLO” path)
curl -fsSL https://opencode.ai/install | bash

# Homebrew (macOS / Linux) — often preferred for updates
brew install anomalyco/tap/opencode
# or: brew install opencode

# npm
npm i -g opencode-ai@latest

# Verify
opencode --version
# then launch
opencode

Also: desktop download from opencode.ai/download (macOS / Windows / Linux). Optional GitHub integration: opencode github install in a repo (see docs/github).

Prompt you can give Codex on the Mac Mini:

Install OpenCode on this Mac for my user account.
Prefer Homebrew tap anomalyco/tap/opencode if brew exists,
else the official install script from https://opencode.ai/install.
Show me the install log, then run opencode --version.
Do not ask me for API keys in chat; stop after install and tell me
to run opencode and /connect myself for Kimi.

Connect Kimi (After Install)

  1. Start OpenCode in a project directory you care about.
  2. Run /connect (or equivalent provider UI in your build).
  3. Select Kimi Code / Kimi provider.
  4. Paste API key from the Kimi code console.
  5. Switch to BUILD mode (Shift+Tab per levelsio); adjust permissions in /settings.

Store the key in a password manager (1Password, etc.) — same discipline as one-time prod secrets for agent tooling.

Caveats & Community Notes

  • Tool-call quality: a reply on levelsio’s thread claimed Kimi via OpenCode can mis-fire tools if it goes through a generic OpenAI-compatible endpoint (“endless thinking / doom loops”). Prefer the path OpenCode documents for Kimi Code; if quality tanks, check provider wiring, not only the model name.
  • Bypass permissions is power-user risk: great for solo experiments on a disposable machine; dangerous on a mini that holds prod keys, client data, or always-on agents without sandboxes.
  • Not a total Claude replacement for everyone: Claude Code still leads for many on ecosystem (skills, Anthropic harness). OpenCode+Kimi is an alternate when you want open shell + different model policy. See Claude Code, Boris hub, 4 steps of adoption.
  • Pricing moves: re-check Kimi membership and OpenCode free-tier models; levelsio’s $19 is a snapshot.

How This Fits Your Stack

Mac Mini agent host

Install OpenCode alongside Claude Code / Codex. Use the right agent for the job; same repos, different policy/model.

vs Claude Code

Claude: deep Anthropic stack + skills. OpenCode: open multi-provider shell. Levelsio switched when blocks frustrated him.

vs Eve

Eve is a filesystem-first framework for durable multi-channel agents. OpenCode is a coding TUI/agent — complementary, not the same layer.

vs Codex

Codex can install OpenCode and help debug config; OpenCode then runs as its own agent with Kimi (or other) models.

Checklist

Related Guides

Claude Code

Anthropic’s agent — the comparison baseline levelsio is reacting to.

Read →

ChatGPT + Codex Super App

Codex computer use and power-user workflows — including “ask Codex to install tools.”

Read →

Eve + Eve Studio

Vercel’s agent framework and Mac control center.

Read →

4 Steps of AI Adoption

Maturity ladder: multi-agent UIs and guardrails matter more than one model brand.

Read →

Agentic Setup Checklist

Harness items so alternate agents don’t become secret chaos.

Open checklist →

Boris Hub

Claude Code frameworks and loops series.

Open /boris →

How Moonshot Makes Open Models Great

CEO Yang Zhilin on token efficiency, long context, agent swarms — why Kimi-class open models aim higher.

Read the talk notes →

Setup credited to @levelsiooriginal post. OpenCode: opencode.ai. Kimi: kimi.com / code console.

Comments

Approved comments appear below. Log in once with GFAVIP — it applies across the whole site. GFAVIP login

View comments archive