shuire (朱入レ)
(Pronounced: SHOO-ee-reh)

A Vim-like TUI git diff viewer and reviewing tool, built in Rust on top of ratatui. Leave inline comments as you review, then pipe the output directly into your AI tool of choice.
Features
- Vim-style key bindings (
j/k,gg/G,Ctrl-d/u,Ctrl-f/b,/,n/p, …) - Toggle between unified and split views (
s) - Syntax highlighting via syntect
- Word-level diff highlighting
- Inline commenting — comments are printed to stdout on exit, making it easy to pipe into AI tools or other workflows
- GitHub PR review (
--pr <url>, via theghCLI)
Installation
Homebrew (macOS / Linux)
Or tap once and install separately:
npm / npx (prebuilt binary)
# One-off run
# Install globally
Supported platforms: Linux x64, Linux arm64, macOS x64, macOS arm64,
Windows x64. The right prebuilt binary is selected automatically via
optionalDependencies.
cargo (from source)
Nix flake
Pre-built binary (Linux / macOS)
|
Installs the latest release to ~/.local/bin. Override the destination with
INSTALL_DIR=/usr/local/bin or pin a version with VERSION=v0.1.0:
INSTALL_DIR=/usr/local/bin VERSION=v0.1.0 \
|
Supported platforms: Linux x64, Linux arm64, macOS x64, macOS arm64.
Usage
# Uncommitted changes — working tree vs HEAD (default)
# Unstaged / staged only
# Working tree vs an arbitrary commit
# Changes introduced by the last commit
# Diff between two branches / commits
# Changes on feature-branch since it diverged from main (three-dot syntax)
# Equivalent to:
# GitHub PR review
Main arguments
| Argument / flag | Description |
|---|---|
<target> |
Commit-ish (default @ = HEAD). Special values: ., working, staged. Accepts A...B three-dot syntax. |
[compare-with] |
Base commit-ish |
--merge-base |
Resolve the base via git merge-base (equivalent to A...B) |
--include-untracked |
Include untracked files (only for . / working) |
-U, --context <N> |
Number of context lines |
--theme <dark|light|deuteranopia> |
Color theme |
--pr <url> |
PR URL to review |
--comment <json> |
Inject initial comments as JSON |
--auto-viewed <glob> |
Automatically mark matching files as viewed |
Configuration
Place a file at ~/.config/shuire/config.{toml,json5,yaml,json,ini} (the
location can be overridden via the SHUIRE_CONFIG environment variable) to
override the default theme and individual colors.
# Default theme (only used when --theme is not passed on the CLI)
= "dark" # "dark" | "light" | "deuteranopia"
# Per-color overrides (layered on top of the base theme)
[]
= "#3fb950"
= "rgb(248, 81, 73)"
= "magenta"
= "#e6c050"
Supported color formats: #RRGGBB / #RGB / rgb(r,g,b) / named colors
(red, green, blue, cyan, magenta, yellow, black, white,
gray, darkgray, light*). Keys correspond to the Theme /
SyntaxPalette field names in src/theme.rs (added_fg, removed_bg,
comment_bar_dim, syntax.keyword, …). Unknown keys and values that cannot
be parsed are ignored.
Key bindings
Navigation
| Key | Action |
|---|---|
j / k, ↓ / ↑ |
Move by one line |
Ctrl-d / Ctrl-u |
Half-page scroll |
Ctrl-f / Ctrl-b |
Full-page scroll |
gg / G |
Jump to top / bottom |
Tab / Shift-Tab, ] / [ |
Next / previous file |
{ / } |
First / last file |
n / p |
Next / previous hunk (search results while searching) |
h / l |
Focus file list / diff |
. |
Center current line |
Display
| Key | Action |
|---|---|
s |
Toggle unified / split view |
F |
Toggle file list |
T |
Switch theme |
< / > |
Adjust file list width |
o / O / Enter |
Expand folded region (20 lines / all) |
Search & comments
| Key | Action |
|---|---|
/ |
Search (diff) / filter (file list) |
Esc |
Clear search |
i |
Add comment at cursor (Insert mode) |
V |
Visual mode (range selection), then i to comment |
dd |
Delete focused comment |
N / P |
Jump to next / previous comment |
C |
Show comment list |
y / Y |
Copy comment at cursor / all comments |
v |
Toggle viewed marker for current file |
e |
Open in editor |
R |
Reload diff |
? |
Help |
q, Ctrl-c |
Quit |
AI Workflow Integration
When you quit shuire, all comments you wrote are printed to stdout in a structured format. This makes it straightforward to feed your review notes directly into AI tools:
# Review a PR and pipe comments into Claude
|
# Review local changes and pass comments to any AI CLI
|
# Save comments for later use
This design lets shuire act as a human-in-the-loop annotation layer: you skim the diff, leave targeted notes, then hand off the structured output to an AI for further analysis, summarization, or action.
Development
See CONTRIBUTING.md.
License
Acknowledgements
shuire was inspired by difit — a beautiful browser-based diff viewer with inline commenting. difit's idea of writing comments alongside diffs and outputting them for use in other tools sparked the core design of shuire.
About the Name: What is "Shuire"?
Shuire (朱入れ) is a traditional Japanese term used in publishing and writing. It literally translates to "putting in red."
When an editor or teacher reviews a physical manuscript, they use a red pen to mark corrections, suggest improvements, and leave feedback. This red-ink markup is called Shuire.
Since code review is the modern software engineer's version of proofreading, we named this TUI tool shuire to act as your digital red pen for reviewing git diffs.