Use Claude Code CLI with OpenCode Go or Zen
Claude Code only talks to Anthropic’s API. If you are on OpenCode Go or Zen, here is the open-source setup I published to bridge them with routatic-proxy.
Claude Code CLI is great, but it only talks to Anthropic’s API. If you are on OpenCode Go ($5/mo) or OpenCode Zen (pay-as-you-go), you cannot plug Claude Code in directly. The APIs do not match.
I put together a small open-source setup kit that wires it up:
Claude Code CLI → routatic-proxy (localhost) → OpenCode Go or ZenWhat the kit does
- One script: install proxy + Claude CLI + configs
- Choose Go or Zen at setup
- Auto or guided install (Windows / Mac / Linux)
- No Anthropic API key needed
Quick setup
Windows (PowerShell)
git clone https://github.com/abdullahmiraz/OPENCODE_CLAUDE_CLI.git
cd OPENCODE_CLAUDE_CLI
.\scripts\setup.ps1macOS / Linux / Git Bash
git clone https://github.com/abdullahmiraz/OPENCODE_CLAUDE_CLI.git
cd OPENCODE_CLAUDE_CLI
bash scripts/setup.shThen run `claude`. To verify the install without making API calls:
.\scripts\check.ps1 # Windows
bash scripts/check.sh # BashWhy a proxy
Claude Code speaks the Anthropic API shape. OpenCode Go/Zen does not. routatic-proxy sits in the middle and translates requests, so you keep the Claude Code workflow while billing through OpenCode.
Credit to the routatic-proxy project for doing the hard translation work. The kit is mostly packaging: install, config templates, and a path that does not assume you already know every moving part.
Repo: https://github.com/abdullahmiraz/OPENCODE_CLAUDE_CLI
If you have been trying to run Claude Code on OpenCode, this might save you an afternoon.