@beeplovsharma/claude-proxy
v1.0.1
Published
Use any LLM provider with Claude Code — one command setup, easy toggle on/off
Maintainers
Readme
Claude Proxy
Use any LLM provider with Claude Code. One command setup. Easy toggle on/off.
Quick Start
npm install -g claude-proxy
claude-proxyThe interactive wizard will ask you:
- Which provider? (DeepSeek, OpenRouter, Ollama, Groq, etc.)
- Your API key
- Which model?
- Start server + enable proxy? → Yes!
That's it. Claude Code now uses your chosen LLM.
Commands
| Command | Description |
|---|---|
| claude-proxy | Interactive setup wizard |
| claude-proxy start | Start proxy server in background |
| claude-proxy stop | Stop proxy server |
| claude-proxy on | Point Claude Code to proxy |
| claude-proxy off | Restore native Anthropic |
| claude-proxy status | Show everything |
| claude-proxy add | Add a custom provider |
| claude-proxy restart | Restart the server |
Toggle Between Proxy and Native Claude
claude-proxy on # Use DeepSeek/Gemini/etc.
claude-proxy off # Back to native AnthropicNo manual settings.json editing. The toggle backs up your settings before modifying.
Manual Setup (Custom Port)
If you want to use a different port or set things up manually:
# Run the wizard, it asks which port you want
claude-proxy setup
# Or edit the config directly
cat ~/.claude-proxy/config.json{
"port": 9999,
"apiKey": "sk-your-key",
"provider": "deepseek",
"model": "deepseek-chat",
"apiBaseUrl": "https://api.deepseek.com/chat/completions"
}Then:
claude-proxy start # Start on port 9999
claude-proxy on # Configure Claude Code
claude-proxy off # Restore original settingsBuilt-in Providers
- DeepSeek — deepseek-chat, deepseek-reasoner
- OpenRouter — Claude, Gemini, GPT models via one API
- Ollama — Local models (no API key needed)
- Groq — Fast inference
- SiliconFlow — Chinese provider with DeepSeek/Qwen models
- Volcengine — ByteDance provider
Custom Providers
claude-proxy addEnter name, API URL, key, and models. Works with any OpenAI-compatible API.
How It Works
Claude Code ──(Anthropic format)──▶ localhost:6666 ──(OpenAI format)──▶ DeepSeek/Gemini/etc.claude-proxy runs a local server that:
- Receives Anthropic-format requests from Claude Code
- Converts them to OpenAI format
- Forwards to your chosen provider
- Converts the response back to Anthropic format
- Returns it to Claude Code
Claude Code has no idea it's not talking to Anthropic.
Files
| Path | Purpose |
|---|---|
| ~/.claude-proxy/config.json | Proxy configuration |
| ~/.claude-proxy/settings-backup.json | Original Claude Code settings backup |
| ~/.claude-proxy/custom-providers.json | Your custom providers |
| ~/.claude-proxy/proxy.pid | Server process ID |
Troubleshooting
Server won't start? Check if port is already in use:
lsof -i :6666Claude Code still using Anthropic? Make sure proxy is enabled:
claude-proxy status
claude-proxy onSwitch back to native Claude:
claude-proxy off