lumen
A fast terminal diff viewer and code review TUI written in Rust, with optional AI commit messages and change explanations.
At a Glance
MIT-licensed terminal diff viewer and code review TUI; free to use, modify and distribute. AI features require your own provider API keys (external costs).
Engagement
Available On
Alternatives
Updated Oct 2026
About lumen
lumen is an open-source command-line tool by jnsahaj, written in Rust, for reviewing git diffs in a terminal interface. It shows uncommitted changes, commits, branches, or GitHub pull requests side by side. Optional AI helpers generate commit messages, explain changes, and translate natural-language requests into git commands.
What It Is
lumen is a terminal diff viewer and code review TUI that ships as a single static Rust binary. It works with Git and Jujutsu (jj). The diff viewer uses tree-sitter syntax highlighting and runs without any AI configuration.
How the Review Workflow Works
Run lumen diff to view uncommitted changes, a specific commit, a branch range, or a GitHub PR by number or URL. Options let you filter to specific files, watch for file changes, soft-wrap long lines, jump to a file on open, and pick from preset themes. Stacked mode steps through a commit range one commit at a time, tracking viewed files per commit. For PRs, marking a file as viewed syncs with GitHub. Reviewers can annotate a selection, a hunk, or a whole file, then view, edit, copy, or export the annotations.
Optional AI Features
After configuring a provider with lumen configure, lumen draft writes a commit message for staged changes, lumen explain summarizes changes and can answer specific questions, and lumen operate turns a natural-language request into a git command, with a confirmation prompt before it runs. Supported providers include OpenAI, Claude, Gemini, Groq, DeepSeek, xAI, OpenCode Zen, Ollama (local), OpenRouter, and Vercel AI Gateway.
Use With Coding Agents
lumen can serve as the review surface for coding agents. After an agent finishes a turn, you run lumen diff through a shell escape, annotate the diff, and press s to write the formatted annotations to stdout. The agent receives them as its next prompt. The README lists Claude Code and Codex, plus any agent with shell access.
Setup Path
Install with Homebrew on macOS and Linux (brew install jnsahaj/lumen/lumen) or with cargo install lumen. Git is required. fzf and mdcat are optional. Configuration comes from CLI flags, a JSON config file, or environment variables.
Community Discussions
Be the first to start a conversation about lumen
Share your experience with lumen, ask questions, or help others learn from your insights.
Pricing
Open Source
MIT-licensed terminal diff viewer and code review TUI; free to use, modify and distribute. AI features require your own provider API keys (external costs).
- Side-by-side diff viewer with tree-sitter syntax highlighting
- Review GitHub Pull Requests with lumen diff --pr 123
- Annotate selections, hunks, or whole files
- Watch mode and stacked-commit review
- Optional AI commit messages and change explanations (10+ providers)
Capabilities
Key Features
- Side-by-side terminal diff viewer with tree-sitter syntax highlighting
- Review GitHub pull requests with lumen diff --pr
- Annotations on selections, hunks, or whole files
- Watch mode and stacked-commit review
- Preset color themes
- AI commit message generation
- AI change explanations
- Natural-language git command generation
- Works with Git and Jujutsu (jj)
- Send annotations to coding agents via stdout
- JSON config file with CLI and environment variable overrides
