Analyze your GitHub contribution history and track your programming productivity over time with beautiful terminal visualizations!
- π Monthly Productivity Analysis - Track contributions per active day with trend visualization
- π Lifetime Statistics - Year-over-year growth analysis from your account creation
- π Weekly Patterns - Understand your contribution patterns by weekday
- π¨ Beautiful Terminal Graphs - No browser needed, everything in your terminal!
- π Privacy First - All analysis runs locally, no data sent anywhere
git clone <repository-url>
cd github_averge_contributions./scripts/install.shThis will:
- Create a Python virtual environment
- Install all required dependencies
- Set everything up for you!
- Go to https://github.com/settings/tokens
- Click "Generate new token" β "Generate new token (classic)"
- Give it a name (e.g., "Contribution Analyzer")
- Select scope:
read:user - Click "Generate token"
- Copy the token (you won't see it again!)
Option A: Environment Variable (Recommended)
export GITHUB_TOKEN=ghp_your_token_hereOption B: Config File
cp config.example.sh config.sh
# Edit config.sh with your token and username
source config.sh# Activate virtual environment (if not already active)
source venv/bin/activate
# Run analysis
python3 monthly_productivity_analysis.py -u your_usernameAnalyzes your contribution productivity by month, filtering out vacation/inactive days.
# Basic usage
python3 analyzers/monthly_productivity_analysis.py -u your_username
# With detailed monthly breakdown
python3 analyzers/monthly_productivity_analysis.py -u your_username --detailed
# Pass token directly (not recommended for scripts)
python3 analyzers/monthly_productivity_analysis.py -u your_username -t ghp_xxxxxOutput includes:
- Beautiful terminal graph with trend line
- Summary statistics
- Peak productivity months
- Recent trend analysis
- Improvement percentages
Shows year-over-year statistics from account creation.
# Basic usage
python3 analyzers/lifetime_contribution_analysis.py -u your_username
# Pass token directly (or use GITHUB_TOKEN environment variable)
python3 analyzers/lifetime_contribution_analysis.py -u your_username -t ghp_xxxxxShows:
- Contributions by year
- Year-over-year growth
- Breakdown by type (commits, PRs, issues, reviews)
- Historical trends
Analyzes contribution patterns by weekday for the current year.
# Basic usage
python3 analyzers/yearly_contribution_summary.py -u your_username
# Pass token directly (or use GITHUB_TOKEN environment variable)
python3 analyzers/yearly_contribution_summary.py -u your_username -t ghp_xxxxxShows:
- Contributions per weekday
- Average per day
- Work patterns (weekday vs weekend)
github-contribution-analyzer/
βββ docs/ # Documentation
β βββ README.md # Main documentation
β βββ GETTING_STARTED.md # Beginner's guide
β βββ PROJECT_STRUCTURE.md # Project overview
β βββ SUMMARY.md # Refactoring summary
βββ scripts/ # Setup & installation
β βββ install.sh # One-command installation
β βββ quickstart.sh # Interactive quick start
β βββ requirements.txt # Python dependencies
βββ config/ # Configuration
β βββ config.example.sh # Configuration template
βββ analyzers/ # Analysis scripts
β βββ monthly_productivity_analysis.py
β βββ lifetime_contribution_analysis.py
β βββ yearly_contribution_summary.py
βββ .gitignore # Git ignore rules
βββ LICENSE # MIT License
βββ README.md # Symlink to docs/README.md
βββ venv/ # Virtual environment
# Setup once
./scripts/install.sh
source venv/bin/activate
export GITHUB_TOKEN=ghp_xxxxx
# Run analysis
python3 analyzers/monthly_productivity_analysis.py -u octocatpython3 analyzers/monthly_productivity_analysis.py -u octocat --detailed > report.txt# Analyze different users
python3 analyzers/monthly_productivity_analysis.py -u user1
python3 analyzers/monthly_productivity_analysis.py -u user2
python3 analyzers/monthly_productivity_analysis.py -u user3β What this tool does:
- Fetches your public contribution data from GitHub's API
- Runs all analysis locally on your machine
- Stores token only in environment variables (never in code)
β What this tool doesn't do:
- Never stores your token permanently
- Never sends data to external servers
- Never accesses private repository contents
- Never modifies any GitHub data
Best Practices:
- Use environment variables for tokens
- Never commit tokens to git
- Regenerate tokens periodically
- Use tokens with minimal required scopes
# Make sure virtual environment is activated
source venv/bin/activate
# Reinstall dependencies
pip install -r scripts/requirements.txt# Set token as environment variable
export GITHUB_TOKEN=ghp_your_token_here
# Verify it's set
echo $GITHUB_TOKENGitHub API has rate limits. Wait an hour or use an authenticated token (which you should already be doing!).
All scripts now accept a -u or --user argument. Make sure you're passing your correct GitHub username:
python3 analyzers/lifetime_contribution_analysis.py -u your_username
python3 analyzers/yearly_contribution_summary.py -u your_username- Cyan line: Your actual monthly productivity
- Green line: 6-month moving average (trend)
- Y-axis: Average contributions per active day
- X-axis: Timeline from account creation to now
What's a good average?
- 5-8: Solid consistent productivity
- 8-12: High productivity
- 12+: Exceptional productivity!
Remember: Quality > Quantity. These numbers are for tracking your own progress, not comparing to others.
Found a bug? Have a feature request? Contributions are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - feel free to use this for personal or commercial projects!
- Built with requests for GitHub API access
- Visualizations powered by plotext
- Inspired by the need to track programming progress
Having issues? Check the Troubleshooting section or open an issue on GitHub.
Made with β€οΈ by programmers, for programmers
Happy analyzing! π