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 recapBasic usage (shows your commits from the last 24 hours):
recapShow commits from the last week:
recap --since "1 week ago"Show commits with diffs from a specific author:
recap --author "John Doe" --show-diffView 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 --playSave the musical representation to a file:
recap --save-music output.midiPlay and save at the same time:
recap --play --save-music output.midiCore 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!
