Blog post covering its creation 📚
This scans all your repositories and aggregates your commit data (ghloc stats
):
To install, run:
brew tap mattrltrent/tap ; brew install ghloc
To verify installation, run:
ghloc --version
Get your GitHub token
-
Go to GitHub's token manager (you may need to login) and click the Generate new token button in the top-right.
-
Give your new token a name, an optional description, and set its expiration. The specifics of what you enter don't matter. However, if your token expires, you'll have to re-enter a new one in the tool.
-
Under Repository access, select All repositories.
-
Under the Permissions > Repository permissions dropdown, grant your token Access: Read-only for:
- Contents
- Commit statuses
Use the CLI tool
Run this to set your credentials with your GitHub username and newfound token:
ghloc set --username <YOUR_NAME> --token <YOUR_TOKEN>
You can check they were added and saved correctly by running:
ghloc creds
And if needed, clear them by running:
ghloc clear
Then run this to check your stats (it will take a while):
ghloc stats
If you're ever lost, try:
ghloc help
or:
ghloc example