CodeLens
Local-first AI code reviewer. Auto-detects AI CLIs on your machine, watches your repos, and reviews commits without sending code anywhere.
Overview
CodeLens is a desktop-style web app that sits on your machine, watches your local git repos, and uses whatever AI CLI you already have installed (Claude Code, Ollama, Gemini, or OpenAI) to review new commits automatically. No API keys to manage. No external servers. Your code never leaves your computer.
It’s built for solo developers, freelancers juggling multiple client repos, and anyone who can’t (or won’t) pipe proprietary code through a third-party review service.
The challenge
Solo devs and freelancers don’t have a reviewer. There’s no second pair of eyes on that Saturday-night commit that introduces a subtle SQL injection or the Stripe webhook that silently swallows errors.
The options on the market either want a GitHub integration (and all the repo access that comes with it) or they pipe every diff to an API you don’t control. For client work under NDA, that’s an instant no. For side projects, it’s more surface area than the review is worth.
Meanwhile, the tools that could do the review well (Claude Code, Ollama, Gemini CLI) are already sitting on the developer’s machine. They just don’t watch anything. They wait to be prompted.
The reframe
The problem wasn’t “build a better AI code reviewer.” The problem was: the AI is already installed; why is nothing using it for passive, continuous review?
Once I framed it that way, the product became small. I didn’t need to train a model or host anything. I just needed something that watched a folder, caught new commits, piped the diff to the CLI that was already on the machine, and rendered the response in a way a human could act on.
Key decisions
Use the provider the user already has. On startup, CodeLens shells out claude --version, gemini --version, openai --version, and hits localhost:11434 for Ollama. Whatever’s available shows up in the settings. Zero configuration, zero keys.
Pipe via stdin for CLI providers, HTTP for Ollama. Each provider is a single file in lib/providers/ implementing a 3-method interface (name, isAvailable, review). Adding a provider is a pull request, not a refactor.
Watch, don’t hook. Polling the filesystem every 60 seconds is crude, but it works against any git repo regardless of hosting, hook configuration, or network. Reviewers are often just “invite a bot to your org.” CodeLens is “point it at a folder.”
Three panels, not a feed. Findings on the left, diff in the middle, suggested fix and copy-paste prompt on the right. Clicking a finding jumps the diff to the right line. It reads like a pull request review, not a changelog.
Track status without asking. When a new commit touches a file with open findings and the issue category no longer appears, the finding flips to “fixed” automatically. No checkbox. No manual acknowledgement.
SQLite, not a service. Everything is in a single local file. Move the folder, the database comes with it. Delete the folder, CodeLens forgets you.
Impact
- Ships with four providers working out of the box: Claude Code, Ollama, Gemini CLI, OpenAI CLI.
- Deep-review mode audits an entire codebase (not just the latest diff) for first-pass onboarding on inherited repos.
- Findings export as Markdown, ready to paste into a PR description, Notion, or a client report.
- Open-sourced under MIT on GitHub; contributions land as single-file provider adapters.
Reflection
The product that came out of this was smaller than the one I started designing. The initial sketches had workflows, rules engines, shared team dashboards. None of it mattered to the actual user. Somebody who just wanted a second opinion on a commit without a ceremony.
Strip everything that doesn’t serve that moment and what’s left is: a folder picker, a watcher, and three panels. That’s the whole app.
Tech stack
Next.js 16 (App Router, Turbopack) · TypeScript · SQLite via Drizzle ORM · custom component library · Lucide icons · Google Sans / Google Sans Code.