Lumen: The Local Code Reviewer That Lives in Your Terminal
How a Rust-powered TUI bridges the gap between raw diffs and meaningful history using local-first AI.

The missing code review tool in the era of AI coding agents.
- Lumen uses a Rust-powered side-by-side diff engine to turn terminal commits into a structured self-review.
- A custom word-diff heuristic suppresses visual noise when code changes are too significant for granular highlighting.
- The tool supports multiple AI providers and includes a default no-API-key mode through Phind.
- Architecture abstractions allow the TUI to support both Git and the Jujutsu version control system.
The Cognitive Tax of the Empty Prompt
The "Inner Loop" of development has a massive blind spot: the gap between finishing a line of code and typing git commit. We usually fill this gap with a messy git diff that scrolls off the screen, followed by a brain-draining session of summarizing our own work into a "Conventional Commit" message.
Lumen is interesting because it treats the terminal not just as a text output, but as a high-fidelity code review environment. By combining a Rust-powered side-by-side diff engine with local-first AI, it turns the solitary act of committing into a structured, assisted "self-review."
Re-Engineering the Terminal Diff
A deep dive into the Rust diff engine reveals how Lumen transforms standard git diff output into a readable side-by-side view. The compute_word_diff function uses a "meaningful content" ratio (MIN_UNCHANGED_RATIO = 0.20).
If two lines are too different, it suppresses word-level highlighting to avoid visual noise. This shows a high degree of polish in the UI logic. The compute_side_by_side algorithm pairs consecutive deletions and insertions.
Intelligence Without the Cloud
Lumen handles AI through a provider-agnostic trait system, supporting OpenAI, Claude, Groq, and Ollama. Uniquely, it offers a "no API key" mode using Phind by default, lowering the barrier to entry.
The operate command translates natural language intent into executable shell commands, incorporating safety checks to prevent destructive Git mistakes.
Beyond the Git Monoculture
Analysis of the jj.rs implementation reveals how Lumen abstracts Version Control to support Jujutsu. This "VCS-agnosticism" is a bet on the future of developer tools.
The detect_git_syntax function intercepts Git idioms and suggests the jj equivalent, easing the transition for users.
| Feature | Delta | Aicommits | Lumen |
|---|---|---|---|
| Primary Focus | Visibility (Aesthetics) | Single-purpose AI | Interactive TUI + AI + Multi-VCS |
| Language | Rust | TypeScript | Rust |
| AI Integration | None | Yes | Yes (Multiple Providers + Local) |