Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ghbadge

See exactly how close you are to every GitHub profile achievement — merged PRs, co-authored PRs, stars, accepted discussion answers — with the count you still need for the next tier.

GitHub shows you the badges you have already earned. It does not tell you that you are four merged pull requests away from Pull Shark bronze. This does.

GitHub badge progress — LuShadowX

  Pull Shark               12 /   16  ███████████████░░░░░  x16 (bronze) — 4 more merged PRs
  Pair Extraordinaire       4 /   10  ████████░░░░░░░░░░░░  x10 (bronze) — 6 more co-authored PRs
  Galaxy Brain              0 /    2  ░░░░░░░░░░░░░░░░░░░░  earn it — 2 more accepted answers
  Starstruck                2 /   16  ██░░░░░░░░░░░░░░░░░░  earn it — 14 more stars on my-best-repo

  Quickdraw             earned ✓
  YOLO                  earned ✓
  Public Sponsor        not earned  sponsor any developer via GitHub Sponsors

Install

One file, standard library only, Python 3.9+.

curl -O https://raw.githubusercontent.com/LuShadowX/Github-badge-tracker/main/ghbadge.py
chmod +x ghbadge.py
./ghbadge.py

Usage

ghbadge                       # the authenticated user
ghbadge octocat               # anyone else
ghbadge --fast                # skip the per-PR commit scan
ghbadge --json                # machine-readable, for scripts and CI
ghbadge --repo owner/name     # also scan this repo for your accepted answers

Authentication comes from GH_TOKEN, GITHUB_TOKEN, or a logged-in gh CLI. A token with default public scopes is enough.

What each number means

Achievement Tiers How it is counted
Pull Shark 2 / 16 / 128 / 1024 merged PRs you authored, via the search API
Pair Extraordinaire 1 / 10 / 24 / 48 merged PRs whose commits carry a Co-authored-by trailer
Galaxy Brain 2 / 8 / 16 / 32 discussions whose accepted answer is yours
Starstruck 16 / 128 / 512 / 4096 stars on your most-starred own repo

Quickdraw, YOLO and Public Sponsor are one-time awards with no tiers, so they are shown as earned or not rather than as progress.

Known limits

  • Galaxy Brain is a best-effort scan. No API lists "discussions this user answered", so ghbadge scans repos you own plus repos you have opened PRs in. If you answer questions elsewhere, add those repos with --repo, or keep a watchlist file of owner/name lines and pass --watchlist path.
  • Earned marks are read from your public profile page, since achievements are not exposed through the API. If that read fails, progress still works and the earned marks are simply omitted.
  • The co-author scan costs one request per merged PR. Use --fast to skip it when you only care about the other counters.
  • Forks you own are included in the star scan; GitHub only counts stars on the repo itself, which is what is reported.

License

MIT

About

See exactly how close you are to every GitHub profile achievement — merged PRs, stars, accepted answers, and the count you still need for the next tier.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages