Articles
development

πŸš€ 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

πŸš€ Claude Code is now effectively free to run locally.

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. πŸ§