Why free-claude-code Soared to 16K+ Stars on GitHub Weekly Rankings

free-claude-code is a lightweight Python/FastAPI proxy that lets Claude Code bypass costly official APIs by routing requests to free or low‑cost LLM providers, addressing high cost, access restrictions, and model lock‑in, while offering easy setup, multi‑provider support, and advanced Discord/Telegram bot features that have earned it over 16,000 GitHub stars.

Java Tech Enthusiast
Java Tech Enthusiast
Java Tech Enthusiast
Why free-claude-code Soared to 16K+ Stars on GitHub Weekly Rankings

Background and Motivation

Claude Code, Anthropic's terminal‑level AI coding assistant, offers powerful features such as code generation, repository understanding, Git operations, and multi‑file refactoring, but its official API is expensive, difficult to access from China, and tied to Anthropic's own models. These pain points—high cost, access difficulty, and model lock‑in—created a demand for a free, flexible alternative.

What is free-claude-code?

free-claude-code (GitHub: Alishahryar1/free-claude-code) is a Python/FastAPI proxy that intercepts Claude Code's requests to Anthropic and forwards them to other LLM providers (NVIDIA NIM, OpenRouter, DeepSeek, local models, etc.). Claude Code remains unaware of the substitution, believing it still communicates with the official API.

┌─────────────────┐   ┌──────────────────────┐   ┌──────────────────┐
│  Claude Code    │──▶│  Free Claude Code    │──▶│  Real LLM Vendor │
│  CLI / VSCode   │◀──│  Local Proxy (8082) │◀──│  NIM / OR / Local│
└─────────────────┘   └──────────────────────┘   └──────────────────┘
    Anthropic API format               OpenAI‑compatible format (SSE)

Why It Gained Popularity

Cost reduction: Connects to free tiers like NVIDIA NIM (40 req/min, no credit card) and other free models.

Access improvement: Operates entirely locally, bypassing Anthropic's network.

Model flexibility: Supports six providers, allowing mixed‑model configurations (e.g., routing Opus, Sonnet, Haiku to different back‑ends).

Key Design Features

Zero‑intrusion: Only two environment variables are needed; no changes to Claude Code CLI or VSCode extension.

Thinking‑chain preservation: Parses <thinking> and reasoning_content tags so models like DeepSeek R1 and GLM display their reasoning.

Tool‑call fixing: Heuristic parser automatically corrects malformed tool calls from open‑source models.

Smart rate‑limiting: Built‑in concurrency control and 429 back‑off prevent free APIs from being blocked.

Provider Coverage

The project currently supports six providers, spanning fully free to fully local solutions:

NVIDIA NIM: Free, 40 req/min, high‑quality models (e.g., Qwen 3.5, GLM 5).

OpenRouter: Free or paid models, variable rate limits, broad model selection for fallback.

DeepSeek: Pay‑as‑you‑go, rate limits depend on plan, Anthropic‑compatible interface.

LM Studio: Free local models, unlimited rate, suitable for privacy‑sensitive or offline environments.

llama.cpp: Free local inference, unlimited rate, lightweight on‑device deployment.

Ollama: Free local, unlimited rate, the easiest local solution to get started.

Getting Started in 10 Minutes

Obtain an NVIDIA NIM API key from build.nvidia.com (register, verify phone, click “Get API Key”).

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 the project
git clone https://github.com/Alishahryar1/free-claude-code.git
cd free-claude-code
cp .env.example .env

Edit .env to add your API key and model mappings, e.g.:

NVIDIA_NIM_API_KEY="nvapi-YOUR_KEY"
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"
ENABLE_MODEL_THINKING=true

Start the proxy:

uv run uvicorn server:app --host 0.0.0.0 --port 8082

Configure Claude Code to point to the local proxy by setting in settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://localhost:8082",
    "ANTHROPIC_AUTH_TOKEN": "freecc"
  }
}

Run claude and verify responses; the UI remains unchanged while the backend model is swapped.

Advanced Usage

Beyond basic CLI/VSCode integration, free-claude-code can run as a Discord or Telegram bot, offering threaded messages, persistent sessions, real‑time streaming of reasoning, and voice‑to‑text via Whisper or NVIDIA NIM.

For dynamic model selection without editing .env, the claude-pick script combined with fzf provides an interactive chooser.

Community Reception

Higher success rate than earlier tools like CC Switch due to consistent model naming and clean request conversion.

Comprehensive documentation lowers the entry barrier.

Active maintenance adds new providers (e.g., native Ollama Anthropic support).

MIT‑licensed, allowing free modification and redistribution.

Some users note that substituted models may not match Claude's native capabilities for very long contexts, complex tool calls, or deep refactoring, but for everyday coding tasks the free models are sufficient.

Conclusion

free-claude-code exemplifies an “ingenious shortcut” open‑source project: it leverages Claude Code’s open API to insert a middle‑layer that lets developers choose any LLM backend, dramatically cutting costs and removing access barriers. As AI coding assistants become core infrastructure, the question of who provides compute and at what cost becomes pivotal—free-claude-code directly addresses that emerging need.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PythonFastAPIAI coding assistantNVIDIA NIMOpenRouterClaude Codefree-claude-codeLLM proxy
Java Tech Enthusiast
Written by

Java Tech Enthusiast

Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.