Back to browse
GitHub Repository

Local-first AI coding CLI. Routes simple tasks to a local LLM (Ollama), complex tasks to Claude. Saves tokens.

23 starsTypeScript

Locode, a local first CLI that routes tasks to local LLMs or Claude

by chocks·Mar 9, 2026·4 points·0 comments

AI Analysis

MidCozy

Author admits it's early alpha and a learning experiment—routing logic is the only differentiator.

Strengths
  • Routing simple find/grep tasks to local LLM does save tokens on trivial operations
  • Stats command shows token usage and estimated savings transparently
  • 155 commits for a learning project shows genuine effort and iteration
Weaknesses
  • Author explicitly calls it alpha and learning experiment—no production validation
  • Routing heuristics (regex + confidence threshold) are simplistic compared to competitors
Target Audience

Developers using Claude Code who want to reduce token costs

Similar To

Claude Code · Continue · Aider

Post Description

Hey HN, For the past few months, I have been working a lot with Claude code and a huge fan of the tool. When working on some tasks, I noticed Claude spending tokens for simple local tasks like find, grep etc, so I wondered: what if simple local tasks could run on a local LLM and route complex reasoning Claude?

To help answer that question, I started building Locode, a open source CLI that tries this approach.

The idea is: • run simple tasks locally • route complex reasoning to Claude • reduce inference cost and latency • keep the workflow local first

This project is still very early and mostly a fun learning experiment for me. The entire project was built using Claude Code (not vibe coded). I really love the workflow and it inspired a lot of the design. I’m also a huge fan of Ruff, so I took some inspirations from that as well (no rust yet though).

There is a short demo video in the README if you want to see it in action.

Please take it for a spin if you are interested and let me know what you think and/or if you have experience with cli tools and suggestion on improving Locode, I’m happy to learn.

Cheers! Chocks

Similar Projects

Developer Tools●●Solid

I built a desktop app combining Claude, GPT, Gemini with local Ollama

Hybrid pipeline splits reasoning (cloud) and execution (local), but multi-model orchestration is becoming crowded.

Solve My ProblemSlick
tsunamayo
113mo ago