| Crates.io | oyo |
| lib.rs | oyo |
| version | 0.1.23 |
| created_at | 2025-12-23 05:10:54.563273+00 |
| updated_at | 2026-01-04 07:33:44.800294+00 |
| description | CLI TUI for oyo - Step-through diff viewer |
| homepage | |
| repository | https://github.com/ahkohd/oyo |
| max_upload_size | |
| id | 2000754 |
| size | 1,980,767 |
A diff viewer that works two ways: step through changes or review a classic scrollable diff.
https://github.com/user-attachments/assets/0f43b54b-69fe-4cf3-9221-a7749872342b
oyo extends traditional diffs with an optional step-through mode. Use it like a normal diff viewer with scrolling and hunk navigation, or step through changes one at a time and watch the code evolve. You can switch between both modes at any time.
Review all changes at once, scroll freely, and jump between hunks, just like a traditional diff viewer.
Enable with:
oyo --no-stepsstepping = false in configApply changes incrementally and watch the file transform from old → new.
oyo does not replace classic diffs, it adds a new way to review them.
oy view).tmTheme syntax themes (configurable, with light/dark variants)brew install ahkohd/oyo/oy
cargo install oyo
oy --no-step
# or toggle in-app with `s`
oy
oy old.rs new.rs
oy view
oy old.rs new.rs --view split
oy old.rs new.rs --view evolution
oy old.rs new.rs --autoplay
oy old.rs new.rs --speed 100
oy --range HEAD~1..HEAD
oy --range main...feature
oy --staged
git difftool)git difftool -y --tool=oy
~/.gitconfig:
[difftool "oy"]
cmd = oy "$LOCAL" "$REMOTE"
[difftool]
prompt = false
[alias]
d = difftool -y --tool=oy
Note: keep your pager (
less,moar,moor) forgit diff. Do not setcore.pagerorinteractive.diffFiltertooy.
[ui]
paginate = "never"
diff-formatter = ["oy", "$left", "$right"]
[diff-tools.oy]
command = ["oy", "$left", "$right"]
Vim-style counts: Most navigation commands support count prefixes (e.g., 10j moves 10 steps forward, 5J scrolls down 5 lines).
| Key | Action |
|---|---|
↓ / j |
Next step (scrolls in no-step mode; moves file selection when focused) |
↑ / k |
Previous step (scrolls in no-step mode; moves file selection when focused) |
→ / l |
Next hunk (scrolls in no-step mode) |
← / h |
Previous hunk (scrolls in no-step mode) |
b |
Jump to beginning of current hunk (scrolls in no-step mode) |
e |
Jump to end of current hunk (scrolls in no-step mode) |
gb |
Blame current step (opt-in, step mode) |
p / P |
Peek change (modified → old → mixed) / Peek old hunk |
y / Y |
Yank line/hunk to clipboard |
/ |
Search (diff pane, regex) |
n / N |
Next/previous match |
:line / :h<num> / :s<num> |
Go to line / hunk / step |
< |
First applied step |
> |
Last step |
gg |
Go to start (scroll-only in no-step mode) |
G |
Go to end (scroll-only in no-step mode) |
Space / B |
Autoplay forward/reverse |
Tab |
Cycle view mode |
Shift+Tab |
Cycle view mode (reverse) |
K |
Scroll up (supports count) |
J |
Scroll down (supports count) |
H |
Scroll left (supports count) |
L |
Scroll right (supports count) |
0 |
Start of line (horizontal) |
$ |
End of line (horizontal) |
Ctrl+u |
Half page up |
Ctrl+d |
Half page down |
Ctrl+g |
Show full file path |
gy / gY |
Copy patch for line/hunk |
Ctrl+p |
Command palette |
Ctrl+Shift+p |
Quick file search |
z |
Center on active change |
Z |
Toggle zen mode |
a |
Toggle animations |
w |
Toggle line wrap |
f |
Toggle context folding |
t |
Toggle syntax highlight |
E |
Toggle evo syntax (context/full) |
c / C |
Next/prev conflict |
s |
Toggle stepping (no-step mode) |
S |
Toggle strikethrough |
r |
Replay last step (count supported) |
R |
Refresh file (or all files when file list focused) |
Ctrl+f |
Toggle file panel |
Enter |
Focus file list |
] |
Next file (supports count) |
[ |
Previous file (supports count) |
+ / = |
Increase speed |
- |
Decrease speed |
? |
Toggle help |
q / Esc |
Quit (or close help) |
Clipboard support uses system tools: pbcopy (macOS), wl-copy / xclip / xsel (Linux), clip (Windows).
Search is case-insensitive regex; invalid patterns fall back to literal matching.
Create a config file at ~/.config/oyo/config.toml:
[ui]
auto_center = true # Auto-center on active change (default: true)
topbar = true # Show top bar in diff view (default: true)
view_mode = "unified" # Default: "unified", "split", "evolution", or "blame"
line_wrap = false # Wrap long lines (default: false, uses horizontal scroll)
fold_context = "off" # "off", "on", or "counts"
scrollbar = false # Show scrollbar (default: false)
strikethrough_deletions = false # Show strikethrough on deleted text
gutter_signs = true # Show +/- sign column (unified/evolution)
stepping = true # Enable stepping (false = no-step mode)
[navigation.wrap]
step = "none" # "none" | "step" | "file"
hunk = "none" # "none" | "hunk" | "file"
# [ui.diff]
# bg = false # Full-line diff background (true/false)
# fg = "theme" # "theme" or "syntax"
# highlight = "text" # "text" | "word" | "none"
# extent_marker = "neutral" # "neutral" or "diff"
# extent_marker_scope = "progress" # "progress" or "hunk"
# [ui.blame]
# enabled = false # Show git blame hints (opt-in)
# mode = "one_shot" # "one_shot" or "toggle"
# hunk_hint = true # Show blame hint when jumping to a hunk
# [ui.time]
# mode = "relative" # "relative" | "absolute" | "custom"
# format = "[year]-[month]-[day] [hour]:[minute]" # Used when mode = "custom"
# [ui.split]
# align_lines = false # Insert blanks to keep split panes aligned
# align_fill = "╱" # Fill character for aligned blanks (empty = no marker)
# [ui.evo]
# syntax = "context" # "context" (non-diff only) or "full" (diff + context)
# Syntax highlighting:
# - legacy: syntax = "on" # "on" or "off"
# - table:
# [ui.syntax]
# mode = "on" # "on" or "off"
# theme = "tokyonight" # builtin name or "custom.tmTheme" (from ~/.config/oyo/themes)
# # default: ui.theme.name, fallback to "ansi"
syntax = "on"
# [ui.unified]
# modified_step_mode = "mixed" # "mixed" or "modified" (unified pane only)
# theme = { name = "tokyonight" } # Built-ins listed below
primary_marker = "▶" # Marker for primary active line (single-width char recommended)
primary_marker_right = "◀" # Right pane marker (optional, defaults to ◀)
extent_marker = "▌" # Left pane extent marker (Left Half Block)
extent_marker_right = "▐" # Right pane extent marker (optional, defaults to ▐)
zen = false # Start in zen mode (minimal UI)
[playback]
speed = 200 # Autoplay interval in milliseconds
autoplay = false # Start with autoplay enabled
animation = false # Enable fade animations
animation_duration = 150 # Animation duration per phase (ms)
auto_step_on_enter = true # Auto-step to first change when entering a file
auto_step_blank_files = true # Auto-step when file would be blank at step 0 (new files)
[files]
panel_visible = true # Show file panel in multi-file mode
panel_width = 30 # File panel width (columns)
counts = "active" # Per-file +/- counts: active, focused, all, off
[no_step]
auto_jump_on_enter = true # Jump to first hunk when entering a file in no-step mode
Example config:
[ui]
zen = false
auto_center = true
view_mode = "unified"
gutter_signs = false
topbar = true
[ui.blame]
enabled = true
[ui.theme]
name = "tokyonight"
[ui.diff]
fg = "syntax"
bg = true
highlight = "text"
extent_marker = "diff"
extent_marker_scope = "hunk"
[ui.syntax]
mode = "on"
[ui.evo]
syntax = "full"
[ui.split]
align_lines = true
[playback]
speed = 200
animation = true
animation_duration = 150
autoplay = false
Config is loaded from (in priority order):
$XDG_CONFIG_HOME/oyo/config.toml~/.config/oyo/config.toml~/Library/Application Support/oyo/config.toml on macOS)Theme and syntax theme configuration is documented in THEME.md.
Diff styling previews are available in DIFF_PREVIEWS.md.
Stepping applies changes in file order. The view renders applied changes, highlights the active change, and keeps pending changes muted.
# Build everything
cargo build
# Run tests
cargo test
# Run CLI in development
cargo run --bin oy -- old.rs new.rs