The coding tier
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 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.
# macOS / Linux
curl -fsSL https://opencode.ai/install.sh | bash
# Or via Homebrew
brew install opencode
# Or via npm
npm i -g opencode-ai
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"
}
ollama serve in another terminal, or brew services start ollama.
ollama pull qwen2.5-coder:14b (or your pick from the Ollama page).
cd your-project && opencode. You get a TUI with a chat box, file tree, and diff viewer.
Type: "add input validation to the signup form, write the tests, run the test suite". Watch it work.
Claude Code
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.
# Requires Node 18+
npm install -g @anthropic-ai/claude-code
# Verify
claude --version
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
ollama serve + ollama pull qwen2.5-coder:14b.
From the snippet above, or source ~/.zshrc if you persisted them.
cd your-project && claude. You get the same Claude Code TUI, talking to your local model.
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.
Side by side
Open source, Apache 2.0. Built to be model-agnostic.
Anthropic's CLI, MIT-style. Anthropic-optimized but model-agnostic.