explaingit

alishahryar1/free-claude-code

📈 Trending21,991PythonAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

A proxy server that intercepts Claude Code requests and routes them to free or cheaper AI providers like DeepSeek, Ollama, or local models instead of Anthropic's paid API.

Mindmap

mindmap
  root((repo))
    What it does
      Intercepts Claude Code API calls
      Routes to alternative providers
      Translates protocols automatically
    Supported Backends
      NVIDIA NIM
      OpenRouter
      DeepSeek
      Local models
    Features
      Streaming responses
      Tool use support
      Reasoning blocks
      Discord bot wrapper
      Telegram bot wrapper
      Voice transcription
    Setup
      Run proxy locally
      Set environment variable
      Configure provider
    Tech Stack
      Python 3.14
      uv package manager

Things people build with this

USE CASE 1

Run Claude Code with free-tier models from OpenRouter or DeepSeek instead of paying Anthropic per request.

USE CASE 2

Host your own local AI models with Ollama or llama.cpp and use them through Claude Code without cloud costs.

USE CASE 3

Access Claude Code's coding assistant through a Discord or Telegram bot for team collaboration.

USE CASE 4

Transcribe voice notes and send them as coding instructions to your AI assistant.

Tech stack

PythonuvDiscord APITelegram API

Getting it running

Difficulty · moderate Time to first run · 30min

Requires configuring at least one AI provider (DeepSeek API key, Ollama instance, or local model setup) and Discord/Telegram credentials to see functional routing.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Free Claude Code is a proxy server that lets you use Anthropic's Claude Code developer tool (a command-line AI coding assistant) while routing its AI requests to free or cheaper alternative AI model providers instead of directly to Anthropic's paid API. Here is the problem it solves: Claude Code is built to talk to Anthropic's API, which charges per use. This tool sits between Claude Code and the internet, intercepting those API calls and translating them to work with other services such as NVIDIA NIM, OpenRouter, DeepSeek, LM Studio (a local model runner), llama.cpp (another local runner), or Ollama. This means you can run Claude Code using free-tier models from those services, locally-hosted open models, or whatever alternative you prefer. The proxy handles the protocol translation automatically. From Claude Code's perspective, nothing has changed, it still sends its normal messages. The proxy rewrites those messages into the format each backend expects and translates the responses back. It supports streaming responses, tool use (the ability for the AI to call external functions), and reasoning/thinking blocks. Beyond the terminal, it also offers optional wrappers to use the same AI access through a Discord or Telegram bot, and supports voice note transcription so you can speak your coding instructions. Setup involves running the proxy locally on your machine, setting an environment variable to point Claude Code at localhost instead of Anthropic's servers, and configuring which provider and model to use. The project is written in Python 3.14, uses the uv package manager, and is MIT licensed. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
How do I set up this proxy to route Claude Code requests to my local Ollama instance?
Prompt 2
Show me how to configure this proxy to use DeepSeek's free API instead of Anthropic's paid service.
Prompt 3
How do I create a Discord bot wrapper with this proxy so my team can use Claude Code through Discord?
Prompt 4
What environment variables do I need to set to make Claude Code talk to this proxy server instead of Anthropic?
Prompt 5
Can I use this proxy with voice transcription to send spoken coding instructions to a local model?
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.