Claude Code with Ollama: setup and alternatives

Learn to connect Claude Code to Ollama, choose a model by RAM, and compare FreeLLMAPI and OpenCode using a calculator app test.

Player not loading? Watch on YouTube

This tutorial connects Claude Code to a local LLM through Ollama. The presenter keeps Claude Code's agent harness and replaces the Anthropic model behind it. The setup covers macOS, Windows and Linux, with the demonstration on a MacBook Pro with 18 GB of unified memory.

After installing Ollama and downloading a model, the presenter uses its Apps menu or ollama launch claude to start the coding assistant. He selects Gemma 4 12B and asks it to build and open a calculator. The app completes basic arithmetic checks, though he reports slow generation on his hardware.

His model recommendations are Gemma 4 12B for 8–16 GB RAM, Qwen 3 Coder for 18–32 GB, and GPT OSS 120 for 64 GB or more. For Macs, he advises choosing a model around half the available memory, which explains his smaller selection. These are the speaker's guidelines rather than verified hardware requirements.

The comparison also covers FreeLLMAPI, which combines providers' free API tiers behind one endpoint. Its Docker setup requires provider keys and a dashboard address with the correct port. The presenter notes that code goes to external providers. OpenCode is a separate open source AI agent that he presents as easier to install, with free model options. The video's claims about free use do not establish unlimited provider quotas or equivalent model quality.