A full AI pair programmer in VS Code, running locally in a container, connected and ready in 2 minutes — at zero cost.
This is Claude Code — Anthropic's own coding agent — running against free models via OpenRouter. No Anthropic subscription. No credit card. One free API key and one command.
| Platform | Command |
|---|---|
| Mac / Linux | curl -fsSL https://raw.githubusercontent.com/JohnnyFoulds/claude-code-free/main/install.sh | bash |
| Windows (PowerShell) | irm https://raw.githubusercontent.com/JohnnyFoulds/claude-code-free/main/install.ps1 | iex |
The installer checks that Docker is running, walks you through getting a free OpenRouter API key, pulls the container, and configures VS Code Remote SSH.
Requirements: Docker Desktop · VS Code · Remote - SSH extension
Connect from VS Code:
Cmd+Shift+P→Remote-SSH: Connect to Host→claude-code-free- Open a terminal and run:
cd /workspace
claudeYour /workspace directory persists across container restarts. You can also connect via SSH directly:
Note: Claude Code runs in
bypassPermissionsmode inside this container — it will not prompt before reading, writing, or deleting files. This is intentional for a development container where you control the workspace. Do not mount directories you are not comfortable giving Claude Code full access to.
ssh -p 2223 coder@localhostdocker compose -f ~/.claude-code-free/docker-compose.yml up -d # start
docker compose -f ~/.claude-code-free/docker-compose.yml down # stopdocker compose -f "$env:USERPROFILE\.claude-code-free\docker-compose.yml" up -d # start
docker compose -f "$env:USERPROFILE\.claude-code-free\docker-compose.yml" down # stopThe installer prompts you to choose a model. Change it any time by editing ~/.claude-code-free/.env:
OPENROUTER_MODEL=qwen/qwen3-coder:freeThen restart the container:
docker compose -f ~/.claude-code-free/docker-compose.yml down
docker compose --env-file ~/.claude-code-free/.env -f ~/.claude-code-free/docker-compose.yml up -dNote: Claude Code's built-in
/modelcommand is designed for Anthropic's model roster and does not work with OpenRouter model IDs. Use.envas shown above.
The default model is chosen for rate-limit headroom, not peak quality. For the best coding results with occasional use, try qwen/qwen3-coder:free. For private code, avoid the gpt-oss and gemma free tiers — their providers train on your prompts.
| Model | Context | Req/min | Notes |
|---|---|---|---|
stepfun/step-3.5-flash:free |
256K | 50 | Default — best availability; SWE-bench 74% |
qwen/qwen3-coder:free |
262K | 8 | Best coding quality; privacy-safe (Venice) |
openai/gpt-oss-120b:free |
131K | — | ⚠ Free provider trains on your prompts |
openai/gpt-oss-20b:free |
131K | — | ⚠ Free provider trains on your prompts |
nvidia/nemotron-3-super-120b-a12b:free |
262K | — | ⚠ NVIDIA logs all prompts (trial use only) |
meta-llama/llama-3.3-70b-instruct:free |
65K | 8 | Simple tasks; context halved on free tier |
google/gemma-3-27b-it:free |
131K | — | ⚠ No tool use on free tier — incompatible with Claude Code |
Full list at openrouter.ai/models?q=free. See the model guide for benchmark comparisons, pricing, and privacy details.
Your machine
├── VS Code ──── Remote SSH ────► Docker container (johannesfoulds/claude-code-free)
│ ├── Claude Code CLI
│ ├── Node.js 22
│ ├── Python 3 + w3m + curl
│ └── /workspace (your files, persisted via volume)
│
└────────────────────────────────► OpenRouter API ──► your chosen model
Claude Code speaks the OpenAI API format. This project points it at OpenRouter, which proxies that format to whichever model you select.
| Component | Details |
|---|---|
| OS | Debian (node:22-slim) |
| Claude Code | Latest stable release |
| Node.js | 22 LTS |
| Python | 3 (system) |
| Web access | w3m, curl, markdownify — the model can browse URLs and search the web via Bash |
Anthropic's Claude Code requires a Claude Pro subscription ($20/month) or API credits. This project lets you run the same interface against free models on OpenRouter at no cost.
| This project | Claude Pro | |
|---|---|---|
| Cost | Free | $20/month |
| Setup | One command | Built-in |
| Models | Any OpenRouter model | Claude only |
| Code stays on your machine | Yes | No |
- Want to try Claude Code before committing to a subscription
- Are a student or working in a cost-sensitive environment
- Want to experiment with different models through the same interface
- Do serious daily coding work — the quality difference is real
- Need the latest Claude Sonnet or Opus models
OpenRouter's free models are community-supported. Rate limits, availability, and which models are offered at no cost can change without notice. If you find yourself using this setup regularly, consider adding credits to your OpenRouter account — even a small balance gives you higher rate limits and access to a broader model selection. OpenRouter is pay-as-you-go with no subscription, and most requests cost a fraction of a cent under normal coding use.
Mac / Linux — run in a terminal:
docker compose -f ~/.claude-code-free/docker-compose.yml down --volumes
rm -rf ~/.claude-code-free
# Remove the 'claude-code-free' entry from ~/.ssh/configWindows — run in PowerShell:
docker compose -f "$env:USERPROFILE\.claude-code-free\docker-compose.yml" down --volumes
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude-code-free"
# Remove the 'claude-code-free' entry from %USERPROFILE%\.ssh\configBug reports and pull requests are welcome. Please open an issue first for significant changes.
MIT © Johannes Foulds
