Skip to content
Public template

About

๐Ÿ“Š Self-hosted GitHub traffic & popularity dashboard โ€” daily Action, unlimited history, GitHub Pages

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

78 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“Š GitPulse

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).

GitPulse dashboard

๐Ÿ”— Live demo: koua29.github.io/gitpulse


โœจ What you get

  • ๐Ÿ“ˆ 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

โš™๏ธ How it works

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)

๐Ÿš€ Deploy it on your own GitHub account

Nothing to install locally. The whole setup is done on github.com and takes ~5 minutes.

1. Get the code into your account

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.

2. Create a Personal Access Token (PAT)

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

PAT scopes โ€” check repo

Click Generate token and copy it (it's shown only once).

3. Add the token as a repository secret

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/gitpulse

4. Enable GitHub Pages

Repo โ†’ Settings โ–ธ Pages โ†’ Source: Deploy from a branch, branch main, folder /docs โ†’ Save.

Your dashboard will be at https://YOUR-USERNAME.github.io/gitpulse/.

5. Run it once

Repo โ†’ Actions โ–ธ GitPulse collect โ–ธ Run workflow. That seeds the first snapshot; after that it runs automatically every day.

6. (Optional) Profile README badge

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.


๐Ÿ”’ Privacy

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.

๐Ÿ› ๏ธ Customize

  • 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 :root block.
  • Run locally:
    export GITHUB_TOKEN=ghp_xxx
    export GH_USER=YOUR-USERNAME
    python collect.py

๐Ÿ“š Recommended reading / ร€ lire

Books on coding, Git & GitHub โ€” Amazon affiliate links:

GitHub For Dummies The Pragmatic Programmer Beyond Vibe Coding
๐Ÿ™ 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.

โ˜• Support / Buy me a coffee

If GitPulse is useful to you, a coffee is always appreciated ๐Ÿ™

PayPal โ€” buy me a coffee

๐Ÿ“ License

MIT โ€” see LICENSE. Made to be forked.

About

๐Ÿ“Š Self-hosted GitHub traffic & popularity dashboard โ€” daily Action, unlimited history, GitHub Pages

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages