Learn how to use Claude Code for free with Ollama and a local AI model running on your own computer. In this step-by-step Windows tutorial, we’ll install both tools, adjust Ollama’s context length, connect Claude Code to Gemma 4 12B, and build a playable Breakout game. Then we’ll improve the game with a follow-up prompt and learn how to return to the project later.
This setup uses a local model in the Claude Code tool, with no AI subscription or per-token API charges for local inference. It does not give you free access to Anthropic’s Opus or Sonnet models. Speed and results depend on your hardware and the model you choose.
Host: Kevin Stratvert
📚 RESOURCES
- Download Ollama: https://ollama.com/download/windows
- Claude Code: https://claude.com/product/claude-code
- Ollama + Claude Code setup: https://docs.ollama.com/integrations/claude-code
- Gemma 4 12B: https://ollama.com/library/gemma4:12b
- Qwen 3.5 4B: https://ollama.com/library/qwen3.5:4b
Commands used in the video (PowerShell; run each line separately):
ollama –version
claude –version
mkdir breakout-game
cd breakout-game
ollama launch claude
Windows “claude is not recognized” fix (native installer):
For the current PowerShell window, run:
$env:Path += “;$env:USERPROFILE.local\bin”
To also save it for future terminals, run these three lines:
$claudeBin = Join-Path $env:USERPROFILE ‘.local\bin’
$userPath = [string][Environment]::GetEnvironmentVariable(‘Path’, ‘User’)
if (($userPath -split ‘;’) -notcontains $claudeBin) { [Environment]::SetEnvironmentVariable(‘Path’, ($userPath.TrimEnd(‘;’) + ‘;’ + $claudeBin).TrimStart(‘;’), ‘User’) }
Restart Windows Terminal after saving, then run claude –version. Installation help: https://code.claude.com/docs/en/setup
Build prompt:
Create a colorful, playable Breakout arcade game using HTML, CSS, and JavaScript. Include a paddle controlled by the mouse, a bouncing ball, bricks that disappear when hit, a score counter, and a restart button. Make sure the game works in a web browser.
Improve prompt:
Make the Breakout game look more polished. Add a glowing ball, particle effects when bricks break, and a subtle animated background. Keep the existing gameplay working.