Skip to content

Kingof3O/zenbridge-claude-code

Repository files navigation

ZenBridge for Claude Code

A Windows-friendly launcher for running Claude Code CLI through a local proxy that routes requests to OpenCode Zen models.

It gives you a simple double-click menu so you can choose a model, start the local proxy, launch Claude Code inside your project, control Claude Code permission mode, and manage the model list without editing scripts.

This project is unofficial. It is not affiliated with Anthropic, Claude, OpenCode, Cloudflare, or the proxy maintainers.
You still need your own OpenCode Zen API key and you are responsible for provider terms, limits, privacy, and usage.


How it works

Claude Code expects an Anthropic-compatible API.

OpenCode Zen models are exposed through an OpenAI-compatible API.

This launcher uses a local proxy:

Claude Code
  -> http://127.0.0.1:8787/zen/<model>
  -> local opencode-cowork-proxy
  -> OpenCode Zen

Claude Code may still display a Claude/Sonnet model name. That is normal because the launcher uses a Claude-looking compatibility alias. The real model is selected by the URL path.

To confirm the real model, check your OpenCode Zen usage page.


Features

  • Double-click Windows CMD launcher
  • Dynamic model menu from config\models.json
  • Add custom models from the menu
  • Remove outdated models from the menu
  • Enable or disable models from the menu
  • Update models from a GitHub/raw models.json URL
  • Experimental OpenCode Zen model fetch option
  • Saved OpenCode Zen API key
  • Saved project path
  • Permission mode menu: default, auto, bypassPermissions
  • Automatic cleanup of old local proxy processes on port 8787

Requirements

Install these before using the launcher:

  1. Git for Windows
  2. Node.js LTS with npm
  3. Claude Code CLI
  4. OpenCode Zen API key

Install Claude Code CLI:

npm install -g @anthropic-ai/claude-code

The launcher automatically clones and runs this local proxy:

https://github.com/cucoleadan/opencode-cowork-proxy

Default local proxy folder:

%USERPROFILE%\opencode-cowork-proxy

Quick start

1. Clone or download this repository

git clone https://github.com/Kingof3O/zenbridge-claude-code.git
cd zenbridge-claude-code

Or download the release ZIP and extract it anywhere.

2. Run first-time setup

Double-click:

Setup-FirstRun.cmd

It will ask for:

  • your OpenCode Zen API key
  • your project folder path
  • permission mode

3. Start the launcher menu

Double-click:

ClaudeCode-OpenCodeZen-Menu.cmd

Choose a model and Claude Code will start inside your saved project folder.


Main menu

The launcher menu is powered by:

scripts\Menu.ps1

It reads models dynamically from:

config\models.json

Menu tools include:

A. Add custom model
R. Remove model
E. Enable/disable model
U. Update models from GitHub/raw URL
F. Try fetch models from OpenCode Zen API
P. Change project path
K. Change API key
M. Change permission mode
S. Stop local proxy
I. Show current settings

Managing models

Edit directly:

config\models.json

Example:

[
  {
    "id": "big-pickle",
    "name": "Big Pickle",
    "free": true,
    "enabled": true
  }
]

Or use the launcher menu:

A. Add custom model
R. Remove model
E. Enable/disable model

To update models from your own GitHub raw JSON URL, create:

config\models-source-url.txt

Example:

https://raw.githubusercontent.com/Kingof3O/zenbridge-claude-code/main/config/models.json

Then use:

U. Update models from GitHub/raw URL

Permission modes

The launcher stores your permission mode in:

config\permission-mode.txt

Available modes:

Mode Meaning
default Normal Claude Code behavior. It asks before sensitive actions.
auto Claude Code auto mode, when supported by your current provider/model setup.
bypassPermissions Skips permission prompts. Use only in trusted projects.

For the most automatic behavior, choose:

bypassPermissions

Warning: bypassPermissions can let Claude Code run commands and edit files without asking every time.


Configuration files

Real local configuration files are ignored by Git:

config\project-path.txt
config\proxy-dir.txt
config\permission-mode.txt
config\models-source-url.txt
secrets\opencode-zen-api-key.txt

Public examples are included:

config\project-path.example.txt
config\proxy-dir.example.txt
config\permission-mode.example.txt
config\models-source-url.example.txt
secrets\opencode-zen-api-key.example.txt

Do not commit your real API key.


Troubleshooting

See:

docs\TROUBLESHOOTING.md

Disclaimer

This is an unofficial helper project. Use it at your own risk.

About

Windows launcher for using Claude Code with OpenCode Zen models through a local proxy.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors