Why free-claude-code Is the Must‑Have Open‑Source Proxy for Claude Code
free-claude-code, which amassed over 16 000 stars in a week, offers a zero‑cost local proxy that solves Claude Code’s high API fees, access restrictions, and model lock‑in by routing requests to free or low‑price LLM providers, supports six providers, provides a quick 10‑minute setup, and adds advanced features like Discord bots and interactive model selection.
Why Claude Code Is Hot
Claude Code is Anthropic’s terminal‑level AI coding assistant that can write code, understand whole codebases, perform Git operations, and execute multi‑file refactoring via natural‑language commands. Its popularity has created three pain points: high API cost, difficult access from China, and model lock‑in.
free‑claude‑code Emerges
free‑claude‑code is a lightweight Python/FastAPI proxy that intercepts Claude Code’s requests, forwards them to free or low‑cost LLM providers (NVIDIA NIM, OpenRouter, DeepSeek, LM Studio, llama.cpp, Ollama), and translates the responses back into Claude‑compatible format, so Claude Code operates unchanged.
┌─────────────────┐ ┌──────────────────────┐ ┌──────────────────┐
│ Claude Code │──▶│ Free Claude Code │──▶│ Real LLM Vendor │
│ CLI / VSCode │◀──│ Local Proxy (8082) │◀──│ NIM / OR / Local│
└─────────────────┘ └──────────────────────┘ └──────────────────┘
Anthropic API format OpenAI‑compatible format (SSE)Supported Providers
NVIDIA NIM – free, 40 req/min, high‑quality models for daily use.
OpenRouter – free/paid, rate varies by model, many models for fallback.
DeepSeek – pay‑as‑you‑go, rate depends on plan, Anthropic‑compatible.
LM Studio – free local, unlimited, privacy‑focused.
llama.cpp – free local, unlimited, lightweight inference.
Ollama – free local, unlimited, easiest local solution.
Key Features
Zero‑intrusion: only two environment variables, no changes to Claude Code CLI or VSCode extension.
Thinking‑chain preservation: automatically parses <thinking> and reasoning_content tags for models like DeepSeek R1, GLM.
Tool‑call fixing: heuristic parser corrects malformed tool calls from open‑source models.
Smart throttling: built‑in concurrency control and 429 back‑off to avoid rate‑limit bans.
10‑Minute Quick Start
Visit build.nvidia.com, register a free account, complete phone verification, and copy the API key (e.g., nvapi‑xxx).
Clone the repository and install dependencies:
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.14
# Clone project
git clone https://github.com/Alishahryar1/free-claude-code.git
cd free-claude-code
cp .env.example .envEdit .env to set the NVIDIA NIM key and model mapping:
NVIDIA_NIM_API_KEY="nvapi‑yourKey"
MODEL_OPUS="nvidia_nim/z-ai/glm-5.1"
MODEL_SONNET="nvidia_nim/z-ai/glm-5.1"
MODEL_HAIKU="nvidia_nim/z-ai/glm-5.1"
MODEL="nvidia_nim/z-ai/glm-5.1"
ENABLE_MODEL_THINKING=trueStart the proxy:
uv run uvicorn server:app --host 0.0.0.0 --port 8082Configure Claude Code to point to the local proxy by adding to settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:8082",
"ANTHROPIC_AUTH_TOKEN": "freecc"
}
}Run claude and verify a simple “Hello” query returns a response.
Advanced Usage
The project also offers a Discord/Telegram bot, multi‑model switching, and an interactive model selector claude‑pick that works with fzf for on‑the‑fly model choice.
Why Developers Star the Project
Higher success rate than earlier tools like CC Switch, thanks to unified model naming and clean request conversion.
Comprehensive documentation covering every .env field and provider integration.
Active maintenance with frequent provider additions (e.g., native Ollama Anthropic support).
MIT license enables free modification and downstream development.
Some users note that substituted models may not match Claude’s native capabilities for very long‑context, complex tool calls, or deep refactoring, but they handle everyday coding, single‑file edits, and code explanation well.
Conclusion
free‑claude‑code exemplifies a clever “proxy‑layer” approach: it does not attempt to replicate Claude Code but leverages its open API to let any LLM drive the powerful coding assistant, addressing cost, accessibility, and model‑lock concerns that dominate the AI‑coding ecosystem today.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
