lumen

Ochiq manbalardan

Chiroyli git diff koʻrish vositasi, AI yordamida commitlar yaratish, oʻzgarishlar xulosasini olish — hammasi CLI orqali

Mashina tarjimasi · Asl matnni koʻrsatish

Beautiful git diff viewer, generate commits with AI, get summary of changes, all from the CLI

AI vositaKategoriya: AI vositalariOpen sourcemaʼlumot tekshirilgan: 16-okt, 2026

Sharh

  • cli
  • commit
  • git
  • llm
  • openai
  • rust

Oʻrnatish

Buyruqlar faqat koʻrsatiladi, marketpleys ularni bajarmaydi. Rasmiy hujjatlar bilan solishtiring.
  • Rasmiy reliz fayllariOchiq manbalardanoxirgi rasmiy relizdan
    github.com/jnsahaj/lumen/releases/tag/v2.32.0 ↗
  • Til paketlari reyestriOchiq manbalardanpaket manifestidan — reyestrda chop etilgani tekshirilmagan
    cargo install lumen

    Tekshirilmagan: oʻrnatishdan oldin reyestrdagi paket aynan shu loyihaga tegishli ekanini tekshiring.

    crates.io/crates/lumen ↗
  • Manbadan yigʻishOchiq manbalardankatalog metamaʼlumotlaridan

    Manbadan yigʻish: tekshirilgan yigʻish retsepti yoʻq — repozitoriy koʻrsatmalariga amal qiling.

    github.com/jnsahaj/lumen ↗

Moslik

«Nomaʼlum» dalil topilmaganini bildiradi, mahsulot mos emasligini emas.
PlatformaHolatArxitekturaDalilIshonchlilik
WindowsNomaʼlum———
macOSMosarm64v2.32.0 relizidagi rasmiy yigʻma: lumen-aarch64-apple-darwin.tar.gz0.70
Mosx86_64v2.32.0 relizidagi rasmiy yigʻma: lumen-x86_64-apple-darwin.tar.gz0.70
LinuxMosarm64v2.32.0 relizidagi rasmiy yigʻma: lumen-aarch64-unknown-linux-gnu.tar.gz0.70
Mosx86_64v2.32.0 relizidagi rasmiy yigʻma: lumen-x86_64-unknown-linux-gnu.tar.gz0.70
Web browserNomaʼlum———
Server / self-hostedNomaʼlum———
Container (OCI)Nomaʼlum———

Relizlar

tekshirilgan: 30-okt, 2026
v2.32.0Oxirgi16-iyl, 2026Rasmiy manba ↗

2.32.0 versiyasi fayllari

Marketpleys bu fayllarni saqlamaydi: yuklab olish rasmiy manbadan. Biz ularni skanerlamaganmiz.
FaylPlatformaHajmSHA-256Rasmiy manbadan yuklab olish
lumen-aarch64-apple-darwin.tar.gzmacos · arm64 · tarball10,1 MB45377ec96f28…Rasmiy manba ↗
lumen-aarch64-unknown-linux-gnu.tar.gzlinux · arm64 · tarball11,4 MBebdb801b5639…Rasmiy manba ↗
lumen-aarch64-unknown-linux-musl.tar.gzlinux · arm64 · tarball11,3 MBcd7d4c46249e…Rasmiy manba ↗
lumen-x86_64-apple-darwin.tar.gzmacos · x86_64 · tarball10,1 MB254010a118fb…Rasmiy manba ↗
lumen-x86_64-unknown-linux-gnu.tar.gzlinux · x86_64 · tarball11,3 MB596ea1dc78f6…Rasmiy manba ↗
lumen-x86_64-unknown-linux-musl.tar.gzlinux · x86_64 · tarball11,5 MB60caee482787…Rasmiy manba ↗
lumen-aarch64-apple-darwin.tar.gz.sha256nazorat summalari100 B13715afc460c…Rasmiy manba ↗
lumen-aarch64-unknown-linux-gnu.tar.gz.sha256nazorat summalari105 B601feaecbd25…Rasmiy manba ↗
lumen-aarch64-unknown-linux-musl.tar.gz.sha256nazorat summalari106 B0069a979ccba…Rasmiy manba ↗
lumen-x86_64-apple-darwin.tar.gz.sha256nazorat summalari99 B771111bf1f80…Rasmiy manba ↗
lumen-x86_64-unknown-linux-gnu.tar.gz.sha256nazorat summalari104 B8e5494c63f09…Rasmiy manba ↗
lumen-x86_64-unknown-linux-musl.tar.gz.sha256nazorat summalari105 B55a5a764af3a…Rasmiy manba ↗

Relizlar tarixi

Sifat profili

algoritm quality-v1.0 · baholangan 16-okt, 2026
Sifat bahosi91
Xavf bahosi0
Ishonchlilik 1.00
Sifat bahosi va xavf bahosi — turli koʻrsatkichlar. Yuqori sifat xavfsizlikni kafolatlamaydi.

Baho tarkibi

Qoʻllab-quvvatlash · 2020
last activity 28 days ago
Hujjatlar · 1515
README 14054 chars, description present
Foydalanishga tayyorlik · 1515
install instructions: yes; releases: yes
Metamaʼlumotlar · 108
3/4 of description, homepage, license, topics
Relizlar · 1010
10 release(s), latest 91 days ago
Kategoriya aniqligi · 105
classifier confidence 0.5
Ommaboplik · 109
2890 stars (log-dampened, 10k = max)
Litsenziya aniqligi · 55
SPDX MIT
Hamjamiyat · 55
issues enabled, 155 forks

Litsenziya

MIT
Litsenziya maʼlumrepozitoriy xostingi maʼlumotlariga koʻra

Bu katalog siyosati holati, yuridik xulosa emas.

Manbalar

github.com/jnsahaj/lumenAsosiy★ 2 890 yulduzfaollik: 17-sen, 2026Asosiy repozitoriy · Ishonchlilik 1.00

Sharhlar

Sharh yozish uchun kiring

Hali sharhlar yoʻq.

Muqobillar

README

jnsahaj/lumen dan · litsenziya MIT · yuklangan 30-okt, 2026

lumen

A fast terminal diff viewer and code review TUI, written in Rust.

[Crates.io Total Downloads] [GitHub Releases] [GitHub License] [Crates.io Size]

Review git diff, commits, branches, or GitHub PRs side-by-side without leaving your terminal. Ships as a single static Rust binary and stays snappy on multi-thousand-line diffs.

  • 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)
  • Works with Git and Jujutsu (jj)

[Demo]

Table of Contents

  • Getting Started
    • Prerequisites
    • Installation
  • Usage
    • Visual Diff Viewer
  • AI Features
    • Configuration
    • Generate Commit Messages
    • Generate Git Commands
    • Explain Changes
    • Tips & Tricks
    • AI Providers
  • Coding Agent Integrations
  • Advanced Configuration
    • Configuration File
    • Configuration Precedence

Getting Started 🔅

Prerequisites

Before you begin, ensure you have:

  1. git installed on your system
  2. fzf (optional) - Required for lumen explain --list command
  3. mdcat (optional) - Required for pretty output formatting

Installation

Using Homebrew (MacOS and Linux)
brew install jnsahaj/lumen/lumen
Using Cargo

[!IMPORTANT] cargo is a package manager for rust, and is installed automatically when you install rust. See installation guide

cargo install lumen

Usage 🔅

Visual Diff Viewer

Launch an interactive side-by-side diff viewer in your terminal:

# View uncommitted changes
lumen diff

# View changes for a specific commit
lumen diff HEAD~1

# View changes between branches
lumen diff main..feature/A

# View changes in a GitHub Pull Request
lumen diff --pr 123 # (--pr is optional)
lumen diff https://github.com/owner/repo/pull/123

# Open the PR associated with the current branch
lumen diff --detect-pr

# Filter to specific files
lumen diff --file src/main.rs --file src/lib.rs

# Watch mode - auto-refresh on file changes
lumen diff --watch

# Stacked mode - review commits one by one
lumen diff main..feature --stacked

# Jump to a specific file on open
lumen diff --focus src/main.rs

# Soft-wrap long lines (also settable in lumen.config.json)
lumen diff --wrap
Stacked Diff Mode

Review a range of commits one at a time with --stacked:

lumen diff main..feature --stacked
lumen diff HEAD~5..HEAD --stacked

This displays each commit individually, letting you navigate through them:

  • ctrl+h / ctrl+l: Previous / next commit
  • Click the ‹ / › arrows in the header

The header shows the current commit position, SHA, and message. Viewed files are tracked per commit, so your progress is preserved when navigating.

When viewing a PR, you can mark files as viewed (syncs with GitHub) using the space keybinding.

Theme Configuration

Customize the diff viewer colors with preset themes:

# Using CLI flag
lumen diff --theme dracula

# Using environment variable
LUMEN_THEME=catppuccin-mocha lumen diff

# Or set permanently in config file (~/.config/lumen/lumen.config.json)
{
  "theme": "dracula"
}

Available themes:

ThemeValue
Default (auto-detect)dark, light
Catppuccincatppuccin-mocha, catppuccin-latte
Draculadracula
Nordnord
One Darkone-dark
Gruvboxgruvbox-dark, gruvbox-light
Solarizedsolarized-dark, solarized-light
Flexokiflexoki-dark, flexoki-light

Priority: CLI flag > config file > LUMEN_THEME env var > OS auto-detect.

Selection & Annotations

Selection: Click-drag in the content area for character-level selection, or on line numbers for line-level selection. Selected text can be copied or annotated.

Annotations: Add review comments at three levels of granularity:

  • Selection — select lines with mouse, press i to annotate the selected range
  • Hunk — focus a hunk with {/}, press i to annotate the hunk
  • File — press i with no selection or hunk focus to annotate the whole file

Annotated lines display a ▍ gutter indicator. Use I to view, edit, delete, copy, or export all annotations.

Keybindings
  • j/k or arrow keys: Navigate
  • {/}: Jump between hunks
  • w: Toggle watch mode
  • tab: Toggle sidebar
  • space: Mark file as viewed
  • e: Open file in editor
  • y: Copy selection (or filename)
  • i: Annotate selection / hunk / file
  • I: View all annotations
  • ctrl+h/l: Previous/next commit (stacked mode)
  • ?: Show all keybindings

AI Features 🔅

Lumen also bundles optional AI helpers for commit messages, explanations, and natural-language git commands. These require configuring an AI provider — the diff viewer above does not.

Configuration

Run lumen configure for interactive setup (provider, API key, model). Settings are saved to ~/.config/lumen/lumen.config.json.

Generate Commit Messages

Create meaningful commit messages for your staged changes:

# Basic usage - generates a commit message based on staged changes
lumen draft
# Output: "feat(button.tsx): Update button color to blue"

# Add context for more meaningful messages
lumen draft --context "match brand guidelines"
# Output: "feat(button.tsx): Update button color to align with brand identity guidelines"

Generate Git Commands

Ask Lumen to generate Git commands based on a natural language query:

lumen operate "squash the last 3 commits into 1 with the message 'squashed commit'"
# Output: git reset --soft HEAD~3 && git commit -m "squashed commit" [y/N]

The command will display an explanation of what the generated command does, show any warnings for potentially dangerous operations, and prompt for confirmation before execution.

Explain Changes

Understand what changed and why:

# Working directory or staged changes
lumen explain
lumen explain --staged

# Specific commits or ranges
lumen explain HEAD
lumen explain HEAD~3..HEAD
lumen explain main..feature/A

# Ask specific questions
lumen explain --query "What's the performance impact of these changes?"

# Interactive commit selection (requires: fzf)
lumen explain --list

Tips & Tricks

# Copy commit message to clipboard (macOS / Linux)
lumen draft | pbcopy
lumen draft | xclip -selection c

# Directly commit using the generated message
lumen draft | git commit -F -

lazygit integration is available — see the user config docs for binding lumen draft to a custom command.

AI Providers

Configure your preferred AI provider:

# Using CLI arguments
lumen -p openai -k "your-api-key" -m "gpt-5-mini" draft

# Using environment variables
export LUMEN_AI_PROVIDER="openai"
export LUMEN_API_KEY="your-api-key"
export LUMEN_AI_MODEL="gpt-5-mini"
Supported Providers
ProviderAPI Key RequiredModels
OpenAI openai (Default)Yesgpt-5.2, gpt-5, gpt-5-mini, gpt-5-nano, gpt-4.1, gpt-4.1-mini, o4-mini (default: gpt-5-mini)
Claude claudeYesclaude-sonnet-4-5-20250930, claude-opus-4-5-20251115, claude-haiku-4-5-20251015 (default: claude-sonnet-4-5-20250930)
Gemini geminiYes (free tier)gemini-3-pro, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite (default: gemini-2.5-flash)
Groq groqYes (free)llama-3.3-70b-versatile, llama-3.1-8b-instant, meta-llama/llama-4-maverick-17b-128e-instruct, openai/gpt-oss-120b (default: llama-3.3-70b-versatile)
DeepSeek deepseekYesdeepseek-chat (V3.2), deepseek-reasoner (default: deepseek-chat)
xAI xaiYesgrok-4, grok-4-mini, grok-4-mini-fast (default: grok-4-mini-fast)
OpenCode Zen opencode-zenYessee list (default: claude-sonnet-4-5)
Ollama ollamaNo (local)see list (default: llama3.2)
OpenRouter openrouterYessee list (default: anthropic/claude-sonnet-4.5)
Vercel AI Gateway vercelYessee list (default: anthropic/claude-sonnet-4.5)

Coding Agent Integrations 🔅

Use lumen as the review surface for your coding agent. When the agent finishes a turn, shell-escape to lumen, annotate the diff inline, and press s to send your annotations back as the agent's next prompt.

agent finishes turn → !lumen diff → annotate → press `s`
→ stdout returns to the agent → agent fixes your notes

The mechanics are just stdin/stdout — no plugins, no extensions:

  • s in the diff TUI opens a confirmation modal. On Enter, lumen exits and writes the formatted annotations to stdout (the same text y copies to your clipboard).
  • The TUI auto-routes to /dev/tty when stdout is captured, so the agent receives clean text — no escape codes.

Works with anything that has a shell-escape:

AgentHow to trigger
Claude Code!lumen diff
Codex!lumen diff
Any agent with shell accesslumen diff from a tool/bash call

Annotate with i (selection / hunk / file), press s → Enter to send. Press q to dismiss without sending.

Advanced Configuration 🔅

Configuration File

Lumen supports configuration through a JSON file. You can place the configuration file in one of the following locations:

  1. Project Root: Create a lumen.config.json file in your project's root directory.
  2. Custom Path: Specify a custom path using the --config CLI option.
  3. Global Configuration (Optional): Place a lumen.config.json file in your system's default configuration directory:
    • Linux/macOS: ~/.config/lumen/lumen.config.json
    • Windows: %USERPROFILE%\.config\lumen\lumen.config.json

Lumen will load configurations in the following order of priority:

  1. CLI arguments (highest priority)
  2. Configuration file specified by --config
  3. Project root lumen.config.json
  4. Global configuration file (lowest priority)
{
  "provider": "openai",
  "model": "gpt-5-mini",
  "api_key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "theme": "catppuccin-mocha",
  "wrap": true,
  "draft": {
    "commit_types": {
      "docs": "Documentation only changes",
      "style": "Changes that do not affect the meaning of the code",
      "refactor": "A code change that neither fixes a bug nor adds a feature",
      "perf": "A code change that improves performance",
      "test": "Adding missing tests or correcting existing tests",
      "build": "Changes that affect the build system or external dependencies",
      "ci": "Changes to our CI configuration files and scripts",
      "chore": "Other changes that don't modify src or test files",
      "revert": "Reverts a previous commit",
      "feat": "A new feature",
      "fix": "A bug fix"
    }
  }
}

Configuration Precedence

Options are applied in the following order (highest to lowest priority):

  1. CLI Flags
  2. Configuration File
  3. Environment Variables
  4. Default options

Example: Using different providers for different projects:

# Set global defaults in .zshrc/.bashrc
export LUMEN_AI_PROVIDER="openai"
export LUMEN_AI_MODEL="gpt-5-mini"
export LUMEN_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxx"

# Override per project using config file
{
  "provider": "ollama",
  "model": "llama3.2"
}

# Or override using CLI flags
lumen -p "ollama" -m "llama3.2" draft

Contributors

Made with contrib.rocks.

Interested in Contributing?

Contributions are welcome! Please feel free to submit a Pull Request.

Star History

Repozitoriyni ochish ↗