Claude Code's published CLI running through a local Ollama compatibility shim.
This is not a clean-room rewrite. The UI/agent loop still comes from the bundled upstream CLI; this repo mainly redirects Anthropic-style requests to Ollama and changes the local defaults/branding around it.
node ./bin/ollama-code.mjsnode ./bin/ollama-code.mjs --helpBy default it picks a small installed code model. Set one yourself if you want:
export OLLAMA_HOST=http://127.0.0.1:11434
export OLLAMA_MODEL=qwen2.5-coder:7bSmall models are much faster on CPU, but tool calling gets worse pretty quickly as you go down in size.
.upstream/package/cli.jsis the published upstream CLI bundlebin/anthropic-ollama-shim.mjstranslates/v1/messagesto Ollama/api/chat- streamed Ollama output is converted back to Anthropic-style SSE events
- the launcher patches the visible local branding/defaults
The src/ mirror is incomplete. I keep it around for targeted patching and analysis; it is not a source-complete copy of upstream Claude Code.
More detail on that in docs/MIRROR_GAPS.md.
npm run check