Skip to content

benstroud/lazygaze

Repository files navigation

lazygaze

AI-powered git diff review in your terminal.

The lazygaze TUI pipes git diffs to Claude CLI or Github Copilot CLI with streaming output, prompt library, and persona system. Diff on the left. Analysis on the right. No browser, reduced context switching. Fast workflow.

Go Built with bubbletea Works with: Claude Code Works with: GitHub Copilot License: MIT BuyMeACoffee

This software is licensed under the MIT LICENSE

+ IMPORTANT
- User is responsible for all Claude or Copilot costs incurred and meeting their terms.
- Lazygaze simply delegates to these CLI tools which you configure.

split panes prompt library personas


Features

Feature Description
Split-pane TUI Syntax-highlighted diff left, streaming markdown review right
Prompt library Extensive library of curated prompts across architecture, security, performance, testing, and workflow
Personas 50+ categorized reviewer archetypes inspired by legendary figures
Coding agent selection Use either claude or copilot
Model cycling Switch between Sonnet, Opus, and Haiku on the fly
Multiple diff sources Git ranges, staged changes, initial commit
Clipboard Copy diff or review to clipboard with a single key
CLI mode --cli for scripting and CI pipelines
Persistent config Remembers your preferred model and persona

Requirements

To build

  • Go 1.26+

To run

At runtime, lazygaze delegates to Git and Claude CLI running locally. It expects to find git and claude shell commands in your PATH. Ensure Claude is installed properly, authenticated (claude --version), and has credits/subscription.

GitHub Copilot CLI is also supported as an option instead of Claude Code. Ensure it is installed properly, authenticated (copilot --version), and has credits/subscription.


Installation

Homebrew

brew install benstroud/tap/lazygaze

From source

git clone https://github.com/benstroud/lazygaze
cd lazygaze
make build
sudo mv lazygaze /usr/local/bin/   # or add to your PATH

Usage

The primary mode of operation is the TUI, where you can enter a git range and other options interactively:

lazygaze

Typically, you'll set options interactively once the TUI is launched, but you can also initialize options when launching by using flags:

# Diff expression set at launch instead of interactively (Review the last 3 commits)
lazygaze HEAD~3..HEAD

# Prompt set a launch instead of interactively
lazygaze HEAD~1..HEAD "Focus on security vulnerabilities"

# Specify a model at launch instead of interactively
lazygaze --model opus HEAD~5..HEAD

It is also possible to run non-interactively by using the --cli flag:

# Headless non-interactive output (pipes to stdout)
lazygaze --cli HEAD~1..HEAD

Keybindings

Navigation

Key Action
tab Switch focus between diff and review panes
? Open full keybinding help screen
j / k Scroll focused pane
q / ctrl+c Quit

Diff Source

Key Action
S Review staged changes
D Review dirty changes (uncommitted)
^ Review last commit (HEAD^..HEAD)
U Review upstream changes (diff against upstream branch)
~ Shorthand: enter n to review HEAD~n..HEAD
: Enter a git range (e.g. HEAD~3..HEAD, main..feature, origin/master..HEAD)
r Refresh / re-run current diff

Review

Key Action
/ Set a custom prompt
L Open prompt library
P Select a reviewer persona
m Cycle model: sonnet → opus → haiku
c Copy focused pane to clipboard
z Zoom in/out of the active pane. Useful before selecting text with mouse

Prompt Library

Press L to browse built-in prompts organized by category:

  • Architecture — layering violations, structural improvements
  • Bug Detection — nil dereferences, race conditions, off-by-ones
  • Code Review — thorough review with actionable feedback
  • Code Quality — DRY, naming, error handling
  • Documentation — README generation, missing comments
  • Performance — allocations, N+1 queries, hot paths
  • Security — injection, hardcoded secrets, auth logic
  • Testing — edge cases, unit test suggestions, Gherkin AC
  • Workflow — commit messages, PR descriptions, Jira tickets

Personas

Press P to browse reviewer archetypes organized into categories:

  • CS Foundations — structured programming, algorithmic rigor, formal correctness
  • Legendary Creators — language designers, OS authors, paradigm inventors
  • Clean Code & Design — readability, SOLID principles, refactoring
  • Systems & Performance — low-level optimization, real-time constraints
  • Educators & Evangelists — pedagogy, documentation, knowledge transfer
  • Influencers — popular online voices and engineering culture

Special modes: (Critical Issues Only) suppresses style feedback and reports only bugs, security issues, and data loss risks. (Terse) returns bullet points only.


Development

make build    # compile
make test     # run tests
make clean    # remove binary

Links

lazygit, lazydocker

I took inspiration for this project idea and its name "lazygaze" from the open source TUI projects lazygit and lazydocker, both created by Jesse Duffied.

diffreview

Also see my Zsh LLM code review helper snippets that were a precursor to this project. Example:

# Review the last commit of your feature branch
claudiff "HEAD^..HEAD" "code review"

diffreview - Github

License

MIT

About

Split-pane TUI for AI code review. Pipes git diffs to Claude CLI or GitHub Copilot CLI with streaming output, prompt library, and persona system.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors