How free-claude-code Lets You Use Claude Code’s Full Features for Free
free-claude-code is an open‑source proxy that intercepts Claude Code’s API calls and routes them to free or local models such as NVIDIA NIM, OpenRouter, DeepSeek, LM Studio, llama.cpp or Ollama, enabling full CLI, IDE and Discord/Telegram integration without paying Anthropic.
What it does
free-claude-code is a transparent proxy middleware that intercepts Claude Code client requests to Anthropic’s Messages API and forwards them to a backend model specified by the user. The client remains unaware of the redirection, allowing continued use of Claude Code’s terminal CLI, VS Code extension, and JetBrains plugin.
Supported backends and routing
The proxy can route requests to six backends: NVIDIA NIM, OpenRouter, DeepSeek, LM Studio, llama.cpp, and Ollama. Routing can be defined per model name—for example, Opus to NVIDIA NIM, Sonnet to a local model, Haiku to a free API—while preserving Claude Code’s streaming output, tool calls, and reasoning blocks.
Additional wrappers
Discord and Telegram wrappers enable remote coding sessions. Voice‑note transcription is supported via a local Whisper instance or NVIDIA NIM.
Why it gained attention
Claude Code provides a high‑quality AI coding assistant, but its paid Anthropic API limits adoption.
The free and local model ecosystem (NVIDIA NIM free quota, OpenRouter free models, DeepSeek low cost, LM Studio/Ollama zero‑cost) is mature enough to replace the paid backend.
The proxy requires no configuration changes in Claude Code; only the proxy service needs to run and an environment variable must point to its address.
Quick start guide (≈5 minutes)
The project uses Python 3.14 and the uv package manager.
Clone the repository.
Copy the .env template.
For the default NVIDIA NIM backend, add to .env:
NVIDIA_NIM_API_KEY="nvapi-your-key"
MODEL="nvidia_nim/z-ai/glm4.7"
ANTHROPIC_AUTH_TOKEN="freecc"Start the proxy: uv run uvicorn server:app --host 0.0.0.0 --port 8082 Configure Claude Code to use the proxy address http://localhost:8082. The entire process takes less than five minutes.
Intended users
Individual developers seeking Claude Code’s full workflow without a subscription.
Students and open‑source contributors with limited budgets.
Teams that want to invoke Claude Code remotely via Discord or Telegram, including voice‑driven commands.
Technical highlights
The codebase uses modern tooling: Pytest for testing, Ruff for formatting, Loguru for logging, and Ty for type checking.
Architecturally, it implements per‑model routing with optional fallback chains, allowing different Claude Code model selectors (Opus, Sonnet, Haiku) to map to distinct backends. This flexibility exceeds a simple backend swap.
The proxy also exposes Claude Code’s /model selector through its own /v1/models endpoint, returning the list of available models for seamless client integration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
