SkillAgentSearch skills...

Lumen

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

Install / Use

/learn @jnsahaj/Lumen
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"><img src="https://github.com/user-attachments/assets/896f9239-134a-4428-9bb5-50ea59cdb5c3" alt="lumen" /></p>

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

The missing code review tool in the era of AI coding agents.

Demo

Special Thanks

<div align="center"> <a href="https://coderabbit.link/lumen-oss"> <img width="2152" height="313" alt="image" src="https://github.com/user-attachments/assets/a2039a9d-5c9c-4a8e-a063-753c319f2e20" /> </a> </div>

Table of Contents

Features 🔅

  • Beautiful & Ergonomic Diff Viewer: Review your code with syntax highlighting & leave comments
  • Smart Commit Messages: Generate conventional commit messages for your staged changes
  • Interactive Search: Find and explore commits using fuzzy search
  • Multiple AI Providers: Supports OpenAI, Claude, Groq, Ollama, and more
  • Flexible: Works with any git workflow and supports multiple AI providers
  • Rich Output: Markdown support for readable explanations and diffs (requires: mdcat)

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

Configuration (for AI features)

If you want to use AI-powered features (explain, draft, list, operate), run the interactive setup:

lumen configure

This will guide you through:

  1. Selecting an AI provider
  2. Entering your API key (optional if using environment variable)
  3. Specifying a custom model name (optional - press Enter to use the default)

The configuration is saved to ~/.config/lumen/lumen.config.json.

[!NOTE] The diff command works without any configuration - it's a standalone visual diff viewer.

Usage 🔅

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.

Visual Diff Viewer

Launch an interactive side-by-side diff viewer in your terminal: <img width="3456" height="2158" alt="image" src="https://github.com/user-attachments/assets/dc425871-3826-4368-88d8-931b9403f0ec" />

# 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

# 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

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: | Theme | Value | |-------|-------| | Default (auto-detect) | dark, light | | Catppuccin | catppuccin-mocha, catppuccin-latte | | Dracula | dracula | | Nord | nord | | One Dark | one-dark | | Gruvbox | gruvbox-dark, gruvbox-light | | Solarized | solarized-dark, solarized-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
  • 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

Explain Changes

Understand what changed and why:

# Explain current changes in your working directory
lumen explain                         # All changes
lumen explain --staged                # Only staged changes

# Explain specific commits
lumen explain HEAD                    # Latest commit
lumen explain abc123f                 # Specific commit
lumen explain HEAD~3..HEAD            # Last 3 commits
lumen explain main..feature/A         # Branch comparison
lumen explain main...feature/A        # Branch comparison (merge base)

# Ask specific questions about changes
lumen explain --query "What's the performance impact of these changes?"
lumen explain HEAD --query "What are the potential side effects?"

# Interactive commit selection
lumen explain --list                  # Select commit interactively

Interactive Mode

# Launch interactive fuzzy finder to search through commits (requires: fzf)
lumen explain --list

# Deprecated: lumen list (use lumen explain --list instead)

Tips & Tricks

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

# View the commit message and copy it
lumen draft | tee >(pbcopy)

# Open in your favorite editor
lumen draft | code -      

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

If you are using lazygit, you can add this to the user config

customCommands:
  - key: '<c-l>'
    context: 'files'
    command: 'lumen draft | tee >(pbcopy)'
    loadingText: 'Generating message...'
    showOutput: true
  - key: '<c-k>'
    context: 'files'
    command: 'lumen draft -c {{.Form.Context | quote}} | tee >(pbcopy)'
    loadingText: 'Generating message...'
    showOutput: true
    prompts:
          - type: 'input'
            title: 'Context'
            key: 'Context'

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

| Provider | API Key Required | Models | |----------|-----------------|---------| | OpenAI openai (Default) | Yes | gpt-5.2, gpt-5, gpt-5-mini, gpt-5-nano, gpt-4.1, gpt-4.1-mini, o4-mini (default: gpt-5-mini) | |

Related Skills

View on GitHub
GitHub Stars2.1k
CategoryDevelopment
Updated43m ago
Forks89

Languages

Rust

Security Score

100/100

Audited on Mar 30, 2026

No findings