Rust · Terminal UI 2026
lazystash
Browse, preview and pop git stashes in a terminal UI.
- Role
- Solo — design, Rust, CI and distribution
- Year
- 2026
- Stack
- Rust
- ratatui
- crossterm
- GitHub Actions
- npm
- crates.io
- 1
- runtime dependency — just git
- 5
- prebuilt targets
- 3
- OSes tested in CI
- ~2 kB
- npm wrapper
[A]Overview
A single static binary that turns `git stash` from a guessing game into a two-pane browser: pick a stash, drill into its files, read the live diff, and pop exactly what you meant to.
[B]The problem
`git stash list` shows cryptic one-liners. Finding the stash you actually want means popping, checking, and re-stashing — or squinting at `git stash show -p stash@{3}` one entry at a time.
[C]Approach
- 01
Keep the stash list always visible on the left; let the right pane drill down with you — stash diff, then file tree with +/- counts, then a single file's diff.
- 02
Make popping the only mutating action, and always confirm it first. Allow popping a single file while leaving the rest stashed.
- 03
Shell out to git instead of linking libgit2, so the binary stays small and behaves exactly like the git you already trust.
[D]Highlights
- H-01
Drill-down, not modes
h/j/k/l moves through stash → file tree → file diff, and back out with Esc. Mouse wheel and clicks work where terminals support them.
- H-02
Pop one file
Press p in the file tree or a file's diff to restore just that file and keep the rest of the stash intact.
- H-03
Distribution done properly
cargo install, or an npm package whose postinstall downloads the right prebuilt archive and verifies its SHA-256 before unpacking.
- H-04
Tested against real git
The integration suite creates a scratch repository, makes stashes, and exercises the git layer and state machine — including an actual pop.
[E]Under the hood
- git.rsevery git shell-out and its parsing
- app.rsapplication state and transitions
- ui.rsrendering with ratatui
- event.rskeys → state changes
- main.rsargs, terminal setup and teardown
[F]What I left out
[NEXT] Next project
BudgetBuddy
Personal finance, beautifully simple.