Skip to content

gh-pulse: daily GitHub movement + traffic, by email, TUI and JSON (0.33.0) - #69

Merged
ralyodio merged 2 commits into
masterfrom
worktree-gh-pulse
Sep 13, 2026
Merged

ralyodio merged 2 commits into
masterfrom
worktree-gh-pulse

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

gh-pulse scans every repo the gh token can see (own account plus every org, forks excluded), ranks the ones that moved since the previous run, and puts the result on every surface:

  • Email: HTML with inline PNG charts (SVG rendered by @resvg/resvg-js), sent through Resend. Portfolio chart, ranked movers with score bars, per-repo 14-day views and clones, referrers, popular content, new stargazers, merged PRs, releases, new and lost followers by name.
  • Terminal: gh-pulse show, built on @profullstack/hqtui. Ranked table on the left (click selects, hover lights the row, wheel scrolls), the selected repo's traffic histograms and detail on the right, and a History tab over every snapshot (stars, followers, movers, views, clones per run).
  • Browser: gh-pulse open opens the last HTML report.
  • Pipes: gh-pulse text, gh-pulse json.
  • Pit alias /pulse = gh-pulse show.

Movement: stars, forks, commits, PRs opened/merged/closed, issues opened/closed, releases, plus GitHub traffic (views, unique visitors, clones, unique cloners). Score: star 5, fork 4, release 5, PR merged 3, PR/issue opened 2, commit 1 (capped 25), unique visitor 1, unique cloner 1, clone 0.5, view 0.2. A single clone or visitor a day is noise; two unique visitors or two unique cloners make a traffic-only mover.

Why the window is a snapshot, not a clock

GitHub publishes traffic in UTC-day buckets one to two days late and pads empty buckets up to today for some repos. Each run counts the growth of the 14-day buckets since the previous snapshot, so the window is exactly "since the last email" and a skipped day widens it instead of losing data. Snapshots (~/.local/share/gh-pulse/snapshots/<date>.json.gz) are the only long-run traffic record GitHub leaves you.

Tested

  • 19 new unit tests (windows, newest-day, zero-fill, scoring thresholds, subject, link headers, chart, Resend body, HTML, history rows). Full suite: 942 pass; torrent.test.ts's real-client test timed out once under load and passes alone.
  • tsc --noEmit: the 3 baseline errors only (argontv, free-names).
  • Dry run over 349 repos: ~1,400 API calls, ~30 s, no retries. First real email delivered 2026-09-13 03:06 UTC.
  • TUI captured through a pty: movers, selection, history all render.

Release: this bumps package.json to 0.33.0; tag v0.33.0 + gh release create after merge, per the house convention.

🤖 Generated with Claude Code

https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z

…(0.33.0)

Every repo the gh token can see (own account plus every org, forks
excluded) is checked for movement since the previous run: stars, forks,
commits, PRs, issues, releases, and the /graphs/traffic numbers (views,
unique visitors, clones, referrers, popular content). Movers are ranked by
a weighted score and reach every surface: the email (Resend, HTML with
inline PNG charts rendered from SVG by @resvg/resvg-js), the terminal
(`gh-pulse show`, an hqtui dashboard: click a row, the selected repo's
14-day views and clones, a History tab over every snapshot), the browser
(`open`) and pipes (`text`, `json`). Pit alias `/pulse`.

GitHub publishes traffic in UTC-day buckets one to two days late, so the
window is the growth of each bucket since the previous snapshot rather
than a clock: nothing is missed or double counted when a run is skipped.
Every run writes a gzipped snapshot under ~/.local/share/gh-pulse; GitHub
keeps nothing past 14 days, so those files are the long-run history.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z
@socket-security

socket-security Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​resvg/​resvg-js@​2.6.2991001008770
Added@​profullstack/​hqtui@​0.5.18410010096100

View full report

@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

13 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 5 | LOW: 4

Severity Rule Location
HIGH sh-remote-script-execution root-ubuntu.sh:3227
HIGH sh-remote-script-execution root-ubuntu.sh:3228
HIGH sh-remote-script-execution root-ubuntu.sh:4840
HIGH sh-remote-script-execution root-ubuntu.sh:4844
MEDIUM sh-remote-script-execution root-ubuntu.sh:4993
MEDIUM sh-remote-script-execution root-ubuntu.sh:6055
MEDIUM redos-nested-quantifier src/domain-free.ts:56
MEDIUM redos-nested-quantifier src/mail.ts:1042
MEDIUM redos-nested-quantifier src/wcag.ts:556
LOW secret-generic-credential src/credentials.ts:36
LOW secret-generic-api-key test/credentials.test.ts:208
LOW secret-generic-credential test/mail.test.ts:135
LOW secret-generic-credential test/shorten.test.ts:36

Snippets are redacted; ThreatCrush never prints matched credential material.

pnpm added the exclusion itself when the dependency was installed; without
it a frozen-lockfile install on the runner refuses the version the lockfile
pins.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z
@ralyodio
ralyodio merged commit 9def7e7 into master Sep 13, 2026
5 checks passed
@ralyodio
ralyodio deleted the worktree-gh-pulse branch September 13, 2026 04:38
ralyodio added a commit to profullstack/scripts that referenced this pull request Sep 13, 2026
PR #10 landed gh-pulse in this repo and profullstack/cli-tools#69 landed the
same tool, ported to TypeScript, with the terminal view, open, text and
json on top of the email. Two implementations of one name on PATH is the
drift cli-tools list marks with `!`, so this copy goes and the README points
at the other. No release was cut between the two, so nothing installed on
any box changes.


Claude-Session: https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant