Skip to content

🧠 Recap your work by looking at your git history

Notifications You must be signed in to change notification settings

cesarferreira/recap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Recap

A beautiful Git commit history viewer with stats, colorful output, and musical visualization

demo

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.

✨ Features

πŸ“Š Core Features

  • 🎨 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

πŸ”₯ Code Analysis

  • πŸ“ 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 Features

  • 🎼 Musical visualization of commit history
  • 🎹 MIDI generation from commits
  • πŸ”Š Live playback support
  • πŸ’Ύ Save musical output to files

πŸš€ Installation

cargo install recap

πŸ’‘ Usage

Basic usage (shows your commits from the last 24 hours):

recap

🎯 Core Commands

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"

πŸ”₯ Code Analysis Commands

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

οΏ½οΏ½ Musical Commands

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

πŸ“ Available Options

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

🎡 Musical Visualization Details

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

πŸ› οΈ Building from Source

  1. Clone the repository
  2. Run:
cargo build --release
  1. The binary will be available in target/release/recap

πŸ“„ License

MIT License - feel free to use this in your own projects!

About

🧠 Recap your work by looking at your git history

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published