Self-hosted GitHub stats โ because GitHub only keeps traffic for 14 days and has no account-wide dashboard.
A GitHub Action runs once a day, pulls views / unique visitors / clones / referrers / stars / forks / followers for every public repo you own, and merges them into history files committed back to the repo โ so your data outlives the 14-day window. A static GitHub Pages dashboard charts it all.
โก Zero servers, zero cost, runs even when your computer is off. Everything lives on GitHub: the schedule (Actions), the storage (git), and the dashboard (Pages).
๐ Live demo: koua29.github.io/gitpulse
- ๐ Unlimited history of views / unique visitors / clones โ per repo and aggregated across the account
- โญ Stars, forks, followers over time
- ๐ Top referring sites and popular content
- ๐ Repos ranked by traffic
- ๐ฅ๏ธ A graphical dashboard on GitHub Pages (Chart.js, dark theme, mobile-friendly)
- ๐ An optional auto-updating badge for your profile README
cron 06:17 UTC โโถ GitHub Action โโถ collect.py โโถ merge into data/ โโถ git commit โโถ Pages refreshes
โโถ update_profile.py โโถ badge in <you>/<you> README
| File | Role |
|---|---|
collect.py |
The collector โ Python standard library only, no dependencies |
update_profile.py |
Injects the stats badge into your profile README (optional) |
.github/workflows/collect.yml |
The daily schedule + auto-commit |
data/ |
Accumulated history (JSON, versioned by git) |
docs/ |
The GitHub Pages dashboard (static HTML + Chart.js) |
Nothing to install locally. The whole setup is done on github.com and takes ~5 minutes.
Click Use this template โธ Create a new repository (or Fork), and name it e.g. gitpulse.
The workflow reads the owner from
github.repository_owner, so you don't need to edit a single line โ it automatically targets whoever owns the repo.
GitHub's traffic API requires push access, so you need a token with the repo scope.
Go to Settings โธ Developer settings โธ Personal access tokens โธ Tokens (classic) โ Generate new token (classic):
- Note: anything, e.g.
GitPulse - Expiration: your call (if you set one, remember to renew it, or the daily job will silently stop)
- Scopes: check
repoโ that single top-level checkbox is all you need
Click Generate token and copy it (it's shown only once).
In your GitPulse repo โ Settings โธ Secrets and variables โธ Actions โธ New repository secret:
- Name:
GITPULSE_TOKEN - Secret: paste the token
Or with the GitHub CLI:
gh secret set GITPULSE_TOKEN --repo YOUR-USERNAME/gitpulseRepo โ Settings โธ Pages โ Source: Deploy from a branch, branch main, folder /docs โ Save.
Your dashboard will be at https://YOUR-USERNAME.github.io/gitpulse/.
Repo โ Actions โธ GitPulse collect โธ Run workflow. That seeds the first snapshot; after that it runs automatically every day.
If you have a profile README (a repo named exactly like your username), paste these two markers where you want the badge:
<!--GITPULSE:START-->
<!--GITPULSE:END-->Each daily run rewrites the block between them, e.g.:
๐ 247 views (14d) ยท โญ 12 stars ยท ๐ด 1 forks ยท ๐ฅ 3 followers ยท across 20 repos
If you don't have a profile README, this step is skipped automatically โ nothing to do.
GitPulse collects public repos only (visibility=public, plus a defensive filter). Private repo names and traffic are never written to disk or the dashboard โ safe to publish the dashboard publicly.
- Schedule: edit the
cron:line in.github/workflows/collect.yml(crontab syntax, UTC). - Dashboard look: it's plain HTML/CSS in
docs/index.htmlโ tweak colors in the:rootblock. - Run locally:
export GITHUB_TOKEN=ghp_xxx export GH_USER=YOUR-USERNAME python collect.py
Books on coding, Git & GitHub โ Amazon affiliate links:
![]() |
![]() |
![]() |
|---|---|---|
| ๐ GitHub For Dummies Le contrรดle de version et les pull requests, pas ร pas |
๐ The Pragmatic Programmer Le classique du mรฉtier, 20 ans aprรจs |
โก Beyond Vibe Coding Du codeur au dรฉveloppeur de l'รจre IA |
En tant que Partenaire Amazon, je rรฉalise un bรฉnรฉfice sur les achats remplissant les conditions requises. ยท As an Amazon Associate I earn from qualifying purchases.
If GitPulse is useful to you, a coffee is always appreciated ๐
MIT โ see LICENSE. Made to be forked.





