HubLensClaudeAlishahryar1/free-claude-code
Alishahryar1

free-claude-code

AI#Claude#LLM#Proxy#Python#API
View on GitHub
46

// summary

Free Claude Code acts as an Anthropic-compatible proxy that allows developers to route Claude Code CLI and IDE traffic through various alternative providers. It supports multiple backends including NVIDIA NIM, OpenRouter, DeepSeek, and local models via Ollama or llama.cpp. The tool also features optional Discord and Telegram bot integrations for remote coding sessions and voice-note transcription.

// technical analysis

Free Claude Code is a middleware proxy designed to decouple the Claude Code CLI and IDE extensions from the official Anthropic API by routing traffic through various alternative providers. Its architecture acts as a translation layer, normalizing requests to support NVIDIA NIM, OpenRouter, DeepSeek, and local LLM runners like Ollama or llama.cpp while maintaining compatibility with Claude Code's expected protocol. This project solves the problem of vendor lock-in and cost, allowing developers to utilize free, paid, or local models seamlessly. A key technical trade-off is the reliance on a proxy layer, which requires careful configuration of environment variables and potential adjustments to model-specific tool-use capabilities.

// key highlights

01
Provides a drop-in proxy that routes Anthropic API calls to six different backends including NVIDIA NIM, OpenRouter, and local providers.
02
Supports granular model routing, allowing users to assign different providers to specific model tiers like Opus, Sonnet, or Haiku.
03
Enables native Claude Code model picker functionality by exposing a compatible /v1/models endpoint.
04
Includes optional Discord and Telegram bot wrappers to facilitate remote coding sessions and task management.
05
Features optional voice-note transcription capabilities using local Whisper or NVIDIA NIM backends.
06
Normalizes complex features like streaming, tool use, and reasoning/thinking blocks to ensure consistent behavior across different LLM providers.

// use cases

01
Routing Claude Code traffic to free, paid, or local AI model providers
02
Managing per-model routing to use different providers for specific model tiers
03
Enabling remote coding sessions via Discord or Telegram bot wrappers

// getting started

To begin, install Python 3.14 and the uv package manager, then clone the repository and initialize your environment variables using the provided .env.example template. Start the proxy server using 'uv run uvicorn server:app --host 0.0.0.0 --port 8082'. Finally, configure your Claude Code CLI or IDE extension by setting the ANTHROPIC_BASE_URL to your local proxy address and providing an ANTHROPIC_AUTH_TOKEN.