In this video I walk you through two different ways to run Claude Code completely free. The first method uses Ollama to run open source models locally on your own machine, and the second uses Open Router to access free models in the cloud.
I cover everything from downloading and configuring models to the tradeoffs between local and cloud, and when you'd actually want to use open source models over something like Opus.
"ANTHROPIC_AUTH_TOKEN": "YOUR OPEN ROUTER API KEY",
"ANTHROPIC_API_KEY": "",
"ANTHROPIC_MODEL": "openrouter/free",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "openrouter/free",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "openrouter/free",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "openrouter/free",
"ANTHROPIC_SMALL_FAST_MODEL": "openrouter/free",
"CLAUDE_CODE_SUBAGENT_MODEL": "openrouter/free"