A powerful GitHub CLI extension to visualize and understand contributions across your organization
gh-contrib helps you track, visualize, and analyze GitHub contributions with beautiful graphs, detailed summaries, and AI-powered insights. Perfect for team leads, project managers, and developers who want to understand contribution patterns.
- π Visual contribution graphs - See weekly activity patterns at a glance
- π Detailed contribution lists - Pull requests, issues, and combined views
- π€ AI-powered summaries - Automatically summarize PR/issue content
- π― Flexible filtering - Filter by date ranges and organizations
- β‘ Fast and intuitive - Built with Go for speed and efficiency
gh ext install maxbeizer/gh-contrib# See your own contributions from the last 30 days
gh contrib graph
# Or check someone else's contributions
gh contrib graph octocatπ‘ Tip: If no username is provided, the extension automatically uses your GitHub username!
Create beautiful weekly contribution graphs:
gh contrib graph [username]Example output:
Week 1 (Apr 15 - Apr 21): β’β‘β
Week 2 (Apr 22 - Apr 28): ββ’β’
Week 3 (Apr 29 - May 05): β β‘
Legend:
β’ = Closed PR β = Open PR β = Closed Issue β‘ = Open Issue
Total Contributions: 7 over 31 days (avg: 0.23 per day)
PRs: 4 total (3 closed, 1 open)
Issues: 3 total (1 closed, 2 open)
Pull Requests Only:
gh contrib pulls [username]Issues Only:
gh contrib issues [username]Everything Together:
gh contrib all [username]Summarize multiple PR/issue descriptions using AI:
gh contrib summarizePass content via stdin, separated by ---END-OF-ENTRY--- delimiters.
Get detailed execution information:
gh contrib --debug graph octocatFilter contributions by date range:
# Get contributions since a specific date
gh contrib --since 2025-04-01 pulls octocat
# Works with all commands
gh contrib --since 2025-04-01 graph octocatDate format: YYYY-MM-DD (defaults to 30 days ago if not specified)
Get just the content without metadata:
# Show only PR/issue body content
gh contrib --body-only pulls octocatQuery different organizations on the fly:
# Check contributions in a specific org
gh contrib --org primer pulls octocat
β οΈ Note: GitHub's search API doesn't support OR queries, so you can only query one organization at a time.
Choose your preferred AI model for summaries:
# Use a specific model for summarization
gh contrib --model gpt-3.5 summarizeCustomize default settings in ~/.config/gh/config.yml:
extensions:
gh-contrib:
org: my-custom-org # Default organization
model: gpt-4o # Default AI modelConfiguration options:
org: Default organization name (fallback:github)model: Default AI model (fallback:gpt-4o)
- Go 1.16 or later
- GitHub CLI installed and authenticated
# Build and test locally
make build
# Run tests
make test
# See all available commands
make helpRun the comprehensive test suite:
./script/testIncludes race condition detection and timeout handling.
- π Default behavior: All commands default to your own username when none is provided
- π Best visualization: Use
graphcommand for quick visual insights - π― Focused analysis: Combine
--sincewith specific date ranges for targeted analysis - πββοΈ Quick debugging: Add
--debugto any command for detailed execution info
# Quick personal overview
gh contrib graph
# Team member analysis (last 2 weeks)
gh contrib --since 2025-07-15 all teammate
# Organization-specific search
gh contrib --org microsoft pulls octocat
# Debug a slow query
gh contrib --debug --since 2025-01-01 graph octocatThis project is licensed under the MIT License. See the LICENSE file for details.
Made with β€οΈ for the GitHub community
Report Bug β’ Request Feature β’ Contribute