Skip to content

cempack/codego

Repository files navigation

Codego

A polished local bridge that launches Claude Code against OpenCode Go models through a lightweight local proxy.

What it does

  • installs a daily-use codego command
  • works on macOS and Linux
  • asks for your OpenCode Go API key and preferred model on first run
  • lets you change the model later with codego --reconfigure
  • lets you validate your key with codego --check-key
  • launches Claude Code in the folder you run it from
  • clears and resets the terminal right before handing off to Claude Code

Default upstream configuration:

  • OpenCode endpoint: https://opencode.ai/zen/go/v1/chat/completions
  • OpenCode model: glm-5.1
  • Claude-facing shim model: claude-sonnet-4-6

Install

Download this repository, then run:

chmod +x install-codego.sh codego uninstall-codego.sh
./install-codego.sh

The installer:

  • removes previous cc-glm / codego installs
  • installs runtime files into ~/.codego
  • installs commands into ~/.local/bin
  • adds ~/.local/bin to common shell startup files if needed
  • immediately launches codego unless you pass --install-only

Install without launching:

./install-codego.sh --install-only

Daily use

Run Codego from the project folder you want Claude Code to open:

cd /path/to/project
codego

Useful commands:

codego --reconfigure
codego --reset-key
codego --check-key
codego --doctor
codego --logs
codego --stop
codego --choose-folder
codego --help

Configuration behavior

Model selection

On first setup, Codego asks which OpenCode Go model to use.

Built-in choices:

  • glm-5.1 (recommended)
  • glm-5
  • custom model ID

You can change the saved model later with:

codego --reconfigure

API key storage

Codego uses the best available secret storage automatically:

  • macOS: Keychain
  • Linux: Secret Service via secret-tool, then pass if available
  • fallback: ~/.codego/config.env with restricted permissions

Resetting the API key

codego --reset-key

This now:

  • asks for confirmation before deleting the saved key
  • prompts for the replacement key once
  • does not prompt again right before Claude Code starts

Diagnostics

Check whether the saved key/model works

codego --check-key

This sends a tiny upstream request and classifies the result.

Full environment report

codego --doctor

Useful when debugging platform, config, secret backend, or proxy issues.

Uninstall

codego-uninstall

Or from the repo:

./uninstall-codego.sh

This removes:

  • ~/.codego
  • ~/.local/bin/codego
  • ~/.local/bin/codego-uninstall
  • legacy cc-glm install artifacts if present

Requirements

  • Bash
  • curl
  • Node.js 18+
  • Claude Code
  • OpenCode Go API key

If Claude Code is missing, Codego can offer to install it via the official installer.

License

MIT — see LICENSE.

About

Run Claude Code through OpenCode Go with a polished local proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages