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
Des livres sur le vibe coding, Git & GitHub β liens affiliΓ©s Amazon :
![]() |
![]() |
![]() |
|---|---|---|
| π Git & GitHub Sans Panique J.P. Deffo Fotso |
π€ Vibe Coding avec Agents IA Manuel Mayer Β· Cursor, Copilot & Lovable |
β‘ Vibe Coding Playbook Tung Knowya |
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.





