Workbuddy2api
A lightweight API proxy for domestic and international CodeBuddy backends, providing OpenAI, Anthropic, and Responses-compatible APIs with native support for Claude Code, Codex…
Install: git clone https://github.com/hawklithm/workbuddy2api
Works with Claude Code, Codex · 18 GitHub stars
Install
git clone https://github.com/hawklithm/workbuddy2apiInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →CodeBuddy API Proxy
A lightweight API proxy service that converts CodeBuddy's underlying interface into standard OpenAI, Anthropic, and Responses protocol formats.
中文版文档见 README_zh.md.
✨ Core Features
- Protocol conversion - Supports three standard formats: OpenAI Chat Completions, Anthropic Messages API, and Responses
- Desensitization - Built-in smart desensitization module that automatically filters sensitive information (accounts, passwords, keys, brand terms, paths, etc.) to mitigate review-based false blocks
- Message compression - Intelligently compresses historical messages to dramatically reduce token usage (ideal for long-context scenarios such as Codex CLI)
- Tool call support - Full support for function calling and tool use, with automatic filtering of invalid tool definitions
- DSML parsing - Automatically detects and converts DeepSeek Markup Language (DSML) tool calls
- Streaming responses - SSE streaming output, returning generated content in real time, with built-in 60-second timeout protection
- Domestic and international backends - Uses domestic CodeBuddy by default and switches to the international CodeBuddy service with
--global, with isolated sessions and model catalogs - Multi-account management - Supports isolation of multiple login states for easy switching between work/personal accounts
Installation
Recommended to run from PyPI using uv:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Run the latest available version (uv automatically creates the environment and installs dependencies)
uv run --with workbuddy2api python -m codebuddy_proxy \
--log-file "$HOME/.workbuddy2api/codebuddy-proxy.jsonl"
# Force refresh the cache and run the latest version
uv run --refresh-package workbuddy2api --with workbuddy2api \
python -m codebuddy_proxy \
--log-file "$HOME/.workbuddy2api/codebuddy-proxy.jsonl"
No need to manually activate the virtual environment on subsequent starts; just repeat the uv run command above.
Running from local source
Run the following commands from the project root to use the workspace source code instead of the published PyPI version:
# Sync local project dependencies
uv sync
# Start the local source
uv run python -m codebuddy_proxy --desensitize
On first use, when login is required:
uv run python -m codebuddy_proxy --login --desensitize
Quick Start
1. Start the proxy
# Use the latest version (recommended)
uv run --with workbuddy2api python -m codebuddy_proxy --desensitize
# First use: log in and start
uv run --with workbuddy2api python -m codebuddy_proxy --login --desensitize
# International service: first login and start
uv run --with workbuddy2api python -m codebuddy_proxy --global --login --desensitize
# International service: later starts
uv run --with workbuddy2api python -m codebuddy_proxy --global --desensitize
Listens on http://127.0.0.1:8787 by default.
Domestic and international CodeBuddy backends
The proxy supports both CodeBuddy regions. Domestic mode remains the default, so existing startup commands continue to work unchanged.
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code, like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro…
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…