aggregithub
Aggregate your GitHub statistics for fun and profit!
Installation
Install with npm:
npm install -g aggregithub
Usage
aggregithub
is a command-line tool that generates JSON on standard output:
aggregithub [options] <repos> <aggregate type> [aggregate options]
Options:
-g only match repo names with this glob-like pattern
--token your GitHub API access token (default: process.env.GITHUB_AUTH_TOKEN)
Note: you will very likely run into GitHub API rate limits
if you don't provide the --token
option or set the GITHUB_AUTH_TOKEN
environment variable. You can get a personal access token on your GitHub settings page, then export it like so:
export GITHUB_AUTH_TOKEN="your-super-secret-token"
You should also considering putting this in a .env
file and using autoenv to have it sourced whenever you enter the directory that contains it. However you decide to do it, remember to back up your token somewhere safe, because you won't be able to get it from GitHub again.
Examples
Get commit totals for a user's repos:
aggregithub users/shawnbot commits total > shawnbot-commits.json
Get daily and weekly commit totals for an organization:
aggregithub orgs/18F commits > 18F-commits.json
Available Statistics
commits
Uses the commit activity API
to get total, daily and weekly commit counts within the last year.
More coming soon!