The coding tier

OpenCode and Claude Code, on Ollama.

Hermes and OpenClaw handle the chat-app and scheduling side. For actual code work — multi-file refactors, PR review, test generation, codebase Q&A — point a coding tool at the same Ollama endpoint. Both tools below are model-agnostic and will happily use your local 14B.

OpenCode

OpenCode — open source, terminal-first

OpenCode is the open-source answer to Claude Code. Single Go binary, no API key required if you're using a local provider, full TUI. Designed from day one to be model-agnostic — Ollama is a first-class backend.

Install

# macOS / Linux
curl -fsSL https://opencode.ai/install.sh | bash

# Or via Homebrew
brew install opencode

# Or via npm
npm i -g opencode-ai

Point it at Ollama

OpenCode reads ~/.config/opencode/config.json (or a per-project opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama (local)",
      "options": {
        "baseURL": "http://127.0.0.1:11434/v1",
        "apiKey": "ollama"
      },
      "models": {
        "qwen2.5-coder:14b": {}
      }
    }
  },
  "model": "ollama:qwen2.5-coder:14b"
}

First session

  1. Make sure Ollama is running

    ollama serve in another terminal, or brew services start ollama.

  2. Pull a coding model

    ollama pull qwen2.5-coder:14b (or your pick from the Ollama page).

  3. Run OpenCode in your project

    cd your-project && opencode. You get a TUI with a chat box, file tree, and diff viewer.

  4. Try a real task

    Type: "add input validation to the signup form, write the tests, run the test suite". Watch it work.

What it can do: read/write files, run shell commands, search your codebase, edit multiple files in one turn, run your test suite, commit. Anything you'd ask a junior dev sitting at your terminal.

Claude Code

Claude Code — Anthropic's CLI, on your local model

Claude Code is Anthropic's coding agent. It defaults to Claude, but supports any OpenAI-compatible endpoint — which means Ollama works. You give up some of the polish (no Anthropic-specific tools), but you gain a model that costs nothing to run and never sees your code leave the box.

Install

# Requires Node 18+
npm install -g @anthropic-ai/claude-code

# Verify
claude --version

Point it at Ollama

Claude Code reads API config from environment variables. Set these before launching:

export ANTHROPIC_BASE_URL=http://127.0.0.1:11434/v1
export ANTHROPIC_API_KEY=ollama
export ANTHROPIC_MODEL=qwen2.5-coder:14b

# Persist for future shells
echo 'export ANTHROPIC_BASE_URL=http://127.0.0.1:11434/v1' >> ~/.zshrc
echo 'export ANTHROPIC_API_KEY=ollama' >> ~/.zshrc
echo 'export ANTHROPIC_MODEL=qwen2.5-coder:14b' >> ~/.zshrc

First session

  1. Make sure Ollama is running with the model pulled

    ollama serve + ollama pull qwen2.5-coder:14b.

  2. Export the env vars

    From the snippet above, or source ~/.zshrc if you persisted them.

  3. Launch in your project

    cd your-project && claude. You get the same Claude Code TUI, talking to your local model.

  4. Try the same task

    Use the same prompt from the OpenCode section. Compare results across tools — they're both feeding the same model, but the system prompts and tool schemas differ.

The honest tradeoff: on a 14B local model, OpenCode and Claude Code are roughly equivalent — both are competent at single-file edits, both struggle with multi-file refactors that need to keep 50 files in working memory. The 14B is the bottleneck, not the tool. Upgrade to 32B (or a frontier API) when the task demands it.

Side by side

OpenCode vs Claude Code on Ollama

OpenCode

Open source, Apache 2.0. Built to be model-agnostic.

  • Cost: free, free, free (the model is local, the tool is open source)
  • Auth: none — talks directly to Ollama
  • Ollama support: first-class, documented in their config
  • UI: TUI, file tree, diff viewer, multi-session
  • Best for: anyone who wants zero strings attached

Claude Code

Anthropic's CLI, MIT-style. Anthropic-optimized but model-agnostic.

  • Cost: free for the tool; model is whatever you point it at
  • Auth: needs the env-var set, but no account
  • Ollama support: works via OpenAI-compatible base URL
  • UI: TUI, polished. Same UX you'd get on Claude
  • Best for: people who like Claude Code's specific workflow
How they pick up where the agents leave off: Use Hermes or OpenClaw for the always-on, chat-app, scheduled-work side. Use OpenCode or Claude Code when you sit down to actually write code. They share the same Ollama endpoint, so you can switch between them without restarting anything.