termheat
v1.1.0
Published
π₯ Animated terminal heatmap of your GitHub contributions β zero auth, zero config, npx and done.
Maintainers
Readme
π₯ termheat
Your GitHub contribution graph, alive in the terminal.
An animated heatmap of your last year on GitHub β breathing colors, a reveal wipe, and your current streak literally on fire. No auth, no config, no install:
npx termheat <your-username>
Why
Every other terminal contribution tool prints a static grid and exits. Most demand a token first. termheat is different:
- Zero auth β works instantly for any public profile. Set
GITHUB_TOKENand it upgrades to exact counts via the GraphQL API, but a token is never a gate. - Animated β the grid breathes, fresh data wipes in chronologically, and the cells of your current streak flicker in fire colors.
- Honest about your habits β streak counter, idle-day tracking, and an
opt-in
--shamemode that judges you (gently).
Usage
npx termheat <username> # the whole thing
npx termheat <username> --theme fire # pick a palette
npx termheat <username> --watch # live dashboard, refreshes every 5 min
npx termheat <username> --shame # enable gentle judgementOptions
| Flag | What it does |
| --- | --- |
| -u, --username <name> | GitHub username (or set it in ~/.termheat.json) |
| -t, --theme <theme> | Color theme: github | fire | ocean | mono |
| -w, --watch | Auto-refresh (default: every 5 minutes) |
| -s, --shame | Gentle shame mode β the longer you idle, the spicier the copy |
| -n, --no-animation | Render one static frame (alias: --static) |
| -a, --ascii | ASCII-only output for basic terminals and fonts |
| -e, --export <fmt> | Write a shareable animated card: svg | png |
| -o, --out <file> | Where --export writes (default: ./termheat-<user>.<fmt>) |
| -S, --status | Cached one-line status for tmux/starship: π₯ 37d βββ
ββ |
| -c, --config | Show config file path and contents |
| -h, --help / -v, --version | The usual |
Keys (interactive mode): q quit Β· r refresh.
Plays well with others
- Pipe or redirect the output and termheat renders one static frame and
exits β safe for CI, scripts, and your
.bashrcgreeting. - Honors
NO_COLOR: drops color, animation, and emoji, and switches to an ASCII density ramp (.. -- ++ ** ##) so intensity stays readable.
Share it
Animated SVG card
npx termheat <your-username> --export svgWrites termheat-<username>.svg β the same heatmap as a self-contained card,
with the reveal wipe and streak-flame shimmer embedded as CSS. It animates
anywhere SVG renders, including GitHub READMEs. Commit it to your profile
repo and embed:
Themes apply (--theme fire --export svg), and --no-animation exports a
static frame. Renderers that don't run CSS (and viewers with
prefers-reduced-motion set) gracefully get the finished grid.
PNG
npx termheat <your-username> --export png #svg --out <dir>/termheat-<username>.png/svgRasterization needs @resvg/resvg-js,
which is not installed with termheat β an ~8 MB native binary would slow
every npx cold start for a feature most runs don't use. Install it once where
you run termheat (npm install @resvg/resvg-js) and PNG export lights up.
Status one-liner
npx termheat <your-username> --status
# π₯ 37d βββ
βββββ
βββββ
βCurrent streak plus a two-week sparkline, printed from a local cache
(~/.termheat-cache.json) so it returns instantly β stale data refreshes in a
detached background process, never blocking your prompt. Built for status
bars:
tmux (~/.tmux.conf):
set -g status-interval 60
set -g status-right "#(npx termheat --status) | %H:%M"starship (~/.config/starship.toml):
[custom.termheat]
command = "npx termheat --status"
when = true
shell = "sh"Both recipes assume your username lives in ~/.termheat.json so no argument
is needed. Add --ascii if your bar font lacks the block glyphs.
Configuration
Optional. Drop a ~/.termheat.json and skip the flags:
{
"username": "your-username",
"theme": "fire",
"shame": true,
"refreshMinutes": 10
}CLI flags always win over the config file.
Exact counts with a token
The zero-auth path reads GitHub's public contribution calendar, which rounds
activity into intensity buckets. For exact per-day counts, set a token β any
classic token with read:user scope works:
GITHUB_TOKEN=ghp_... npx termheat <your-username>Same UI either way; the token only improves the numbers.
Development
Built with Ink and developed with Bun:
bun install
bun run dev <username> # run from source
bun test # unit testsReleases are automated with changesets: merging the "chore(release): version package" PR publishes to npm.
License
MIT Β© Moeen Mahmud
