make claude code open!
npm install -g @bitkyc08/openclaudecode · occ start · localhost:10200
Use GPT, Gemini, Grok, DeepSeek, Ollama, or any other LLM with Claude Code — without waiting for Anthropic to add support.
openclaudecode is a lightweight local proxy that translates Claude Code's Anthropic Messages API into whatever your provider speaks. Streaming, tool calls, reasoning tokens, images — everything works, in both directions.
Claude Code CLI ──/v1/messages──▶ openclaudecode ──▶ Any provider
│
OpenAI · Google · xAI · DeepSeek · Ollama · Groq
OpenRouter · Together · Fireworks · Mistral · …
Quick start
npm install -g @bitkyc08/openclaudecode
occ init
occ start
ANTHROPIC_BASE_URL=http://127.0.0.1:10200 claude
How it works
Claude Code sends requests in Anthropic's Messages API format. openclaudecode intercepts them and translates to the target provider's native format:
- OpenAI/xAI/DeepSeek/Groq/Ollama → Chat Completions API
- Google Gemini → Gemini generateContent API
- Anthropic (other key/model) → Messages API passthrough
Tool calls, streaming, images, and thinking/reasoning tokens are all translated bidirectionally.
Configuration
Config lives at ~/.openclaudecode/config.json:
{
"port": 10200,
"defaultProvider": "openai",
"providers": {
"openai": {
"adapter": "openai-chat",
"baseUrl": "https://api.openai.com/v1",
"apiKey": "${OPENAI_API_KEY}",
"defaultModel": "gpt-5.5",
"models": ["gpt-5.4", "gpt-5.4-mini"]
},
"google": {
"adapter": "google",
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
"apiKey": "${GEMINI_API_KEY}",
"defaultModel": "gemini-3.1-pro"
},
"ollama": {
"adapter": "openai-chat",
"baseUrl": "http://localhost:11434/v1",
"defaultModel": "llama3.3"
}
}
}
Model naming
Use <provider>/<model> to route explicitly, or just the model name for auto-routing:
ANTHROPIC_BASE_URL=http://127.0.0.1:10200 claude --model openai/gpt-5.5
ANTHROPIC_BASE_URL=http://127.0.0.1:10200 claude --model gpt-5.5
ANTHROPIC_BASE_URL=http://127.0.0.1:10200 claude --model ollama/llama3.3
CLI
occ init
occ start [--port 10200]
occ stop
occ status
occ help
Roadmap
Related
- opencodex — same idea, but for OpenAI Codex CLI
License
MIT