Use Claude Code with Ollama for local coding help

They configured Claude Code to talk to a local Ollama model and used it on a small Java project inside IntelliJ.

Done with Claude Code· Intermediate· Oct 2026

What they did
The person installed Claude Code through npm and launched it from IntelliJ’s terminal. They set up Ollama, loaded qwen3.5:9b, and pointed Claude Code at Ollama’s Anthropic-compatible local endpoint with environment variables. As a trial, they asked it to create a Java console task manager and confirmed each step before it moved ahead.
How it went
The agent mapped out the work, created the needed files, executed the program, and repaired its own mistakes. The app ran successfully. The author said this local setup is only practical for smaller jobs, and performance depends on the machine.
Tips
If you want to try this, begin with a small project and make sure your hardware can handle the model. Ask the agent to show planned commands and edits first, then approve each irreversible action separately.

Try it yourself with Claude Code

I want to run Claude Code against a local Ollama model on my [Mac/Windows/Linux] computer while working in [IntelliJ/my editor]. Show me how to install Ollama, choose a coding model that fits my [RAM/GPU], and configure Claude Code to use Ollama’s local Anthropic-compatible endpoint. After that, test it on a small request in [my project folder], but pause before any file creation, edits, launches, deletions, or submissions and wait for my approval. Before each change, show me the exact command or config update you plan to use.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Read the original on dev.to ↗

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.