A beautiful Git commit history viewer with stats, colorful output, and musical visualization
Recap is a command-line tool that shows your Git commits across all branches with a beautiful, colorful interface. It includes commit statistics, optional diff viewing capabilities, and can generate musical representations of your commit history.
- π¨ Colorful and easy-to-read commit history
- π Commit statistics table
- π³ Shows commits from all branches
- π₯ Filter by author
- π Optional diff viewing
- β° Flexible time range filtering
- π Identify code hotspots and high-churn files
- π¨βπ» Find file experts with "who knows" analysis
- π Detect bus factor risks and knowledge silos
- π Contributor statistics and suggestions
β οΈ Technical debt indicators
- πΌ Musical visualization of commit history
- πΉ MIDI generation from commits
- π Live playback support
- πΎ Save musical output to files
cargo install recap
Basic usage (shows your commits from the last 24 hours):
recap
Show commits from the last week:
recap --since "1 week ago"
Show commits with diffs from a specific author:
recap --author "John Doe" --show-diff
View commits in a different repository:
recap --repo-path /path/to/repo --since "yesterday"
Analyze code hotspots in the entire repository:
$ recap hotspots
π₯ Hot Files (last month):
1. src/api/users.rs (25 changes)
2. src/db/schema.rs (18 changes)
Find who knows a specific file or directory best:
$ recap who-knows src/main.rs
π File Expertise:
- Alice (65% - primary maintainer)
- Bob (25%)
- Charlie (10%)
Identify bus factor risks in the codebase:
$ recap bus-factor src/
High Risk (Bus Factor 1):
- src/core/auth.rs (95% owned by Alice, 203 lines)
- src/utils/crypto.rs (90% owned by Bob, 156 lines)
Options for bus factor analysis:
recap bus-factor # analyze entire repo
recap bus-factor src/ # analyze specific directory
recap bus-factor --threshold 75 # custom ownership threshold (default: 80%)
This helps identify potential knowledge silos where:
- Files are predominantly owned by a single person
- There's risk if that person becomes unavailable
- Code might benefit from more shared ownership
Play commit history as music:
recap --play
Save the musical representation to a file:
recap --save-music output.midi
Play and save at the same time:
recap --play --save-music output.midi
Core Options:
-a, --author <AUTHOR>
- Filter by author name/email (defaults to git config user.name)-p, --repo-path <PATH>
- Path to Git repository (defaults to current directory)-s, --since <TIME>
- How far back to look (defaults to "24 hours ago")-d, --show-diff
- Show the diff for each commit
Hotspots Options:
--since <TIME>
- How far back to analyze (e.g. '2 weeks ago', 'all' for entire history)
Bus Factor Options:
--threshold <NUMBER>
- Ownership percentage threshold (default: 80)
Music Options:
-p, --play
- Play the commit history as music-s, --save-music <FILE>
- Save musical representation to a MIDI file
Recap can generate MIDI output that represents your commit history as musical notes:
- Additions are represented as ascending notes
- Deletions are represented as descending notes
- Different file changes are played with different instruments
- Commit size affects the volume of the notes
- Clone the repository
- Run:
cargo build --release
- The binary will be available in
target/release/recap
MIT License - feel free to use this in your own projects!