Stoatworks Labs

gh-fleet-analytics

GitHub numbers, before GitHub forgets them

Releasedv0.1.2Library & ProtocolPython
gh-fleet-analytics — GitHub numbers, before GitHub forgets them
The portal, rendered from the synthetic dataset that ships with the repo — no real account's numbers are shown.

What it does

GitHub's own Insights tab shows one repo at a time, and it forgets. Traffic views and clones are kept for fourteen days. Stars, forks and release download counts are worse: the API only ever reports the current total, so a star history doesn't exist unless something wrote the number down each day. This writes the number down each day.

It's the tooling behind this site's own numbers, tidied up and published. One config file names the account and everything else (paths, palette, page title, the custom domain) comes from there, so nothing about my repos is baked in. It's two Python files with no dependencies, one small Cloudflare Worker, and a synthetic dataset so the renderer makes a real page before you've collected anything.

  • Daily snapshot of every repo you own, public and private, into JSON committed to git
  • One password-gated page: fleet-wide views and clones, referrers, download rankings, per-repo sparklines
  • An honest depth note saying exactly how much history exists, because early charts are mostly empty
  • Optional public summary of your public repos only — deliberately no traffic figures
  • Refuses to write an index that lost repos: a narrow token collects a smaller fleet without erroring
  • Self-contained output — no CDN, no fonts, no fetch, so it opens from a file:// URL

Where it stands

Released at v0.1.2, which retries when GitHub drops a connection mid-response (one dropped socket used to end a run with nothing written). It's in daily use against my ~100 repos, which is where it came from. CI renders the bundled synthetic dataset on every push, so a broken renderer fails there, but the GitHub API paths only get exercised by running it for real, and there's no test suite. The Cloudflare Worker is deployed and serving, but the deploy path isn't covered by tests.