π Claude Code is now effectively free to run locally.
Run Claude Code locally with open-source models β no API keys, no costs, no data leaving your machine. Thanks to Ollama's new Anthropic Messages API support, the setup takes under 5 minutes and works with any tool-capable model. A frictionless playground
With Ollama now supporting Anthropicβs Messages API, you can use Claude Code with local openβsource models β no API keys, no token costs, and no data leaving your machine.
That removes two big blockers at once:
π privacy concerns
π usage costs
The setup is surprisingly quick (under 5 minutes):
ππ¨π° ππ¨ π ππ π¬πππ«πππ:
1. Install Ollama
2. Pull a model:
ollama pull qwen2.5-coder
3. Install Claude Code using Anthropicβs official script
4. Point Claude Code to your local Ollama server:
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_BASE_URL=http://localhost:11434
5. Run:
claude --model qwen2.5-coder
Youβre not limited to this model β any Ollama model with tool support can be used. It also works with Ollama Cloud if you donβt want to run everything locally.
This makes it much easier to explore Claude Code in isolation and test how well it performs with different models β privately, cheaply, and without friction.
Perfect playground for anyone experimenting with agentic workflows. π§