Skip to content

Local-first AI coding CLI

Routes simple tasks to Ollama, complex tasks to Claude. Save tokens, save money.

What's New

How It Works

1

You type

Write your prompt — a question, a task, a code request.

2

Locode routes

Smart classification decides which model handles your task.

3

Right model responds

Ollama for simple tasks (free). Claude for complex ones (powerful).

Smart Routing

Regex rules + LLM-assisted classification. Configurable thresholds and patterns in locode.yaml.

Token Savings

Track per-agent and total token usage with USD cost estimates. Benchmark hybrid vs claude-only vs local-only.

Offline Ready

Works entirely offline without an API key. Falls back to Ollama automatically when Claude is unavailable.

MCP Support

Extend with Model Context Protocol servers — including remote ones like Linear.

Save on Every Session

Mode Claude Tokens Used Estimated Cost
Claude-only 100% $$$
Hybrid (locode) ~40–60% $
Local-only 0% Free

Run locode benchmark to see your own savings.

Terminal window
# Install
npm install -g @chocks-dev/locode
# First-time setup
locode setup
# Start coding
locode