TL;DR: Your green contribution squares are a heatmap. I wanted a chart.
So I builtgh-trading-terminal: a GitHub Action that renders your real contribution calendar as a TradingView / Bloomberg-style terminal, as one self-contained SVG you drop into your profile README.
๐ Repo: hanzlabaig-dev/gh-trading-terminal (MIT, Node 18.3+, 0 dependencies)

The preview uses synthetic sample data. Yours uses your real contribution calendar.
๐งญ What's inside the terminal
Every panel is plain SVG, and you choose which ones to show:
| Panel | What it draws |
show name |
|---|---|---|
| ๐ฏ๏ธ Candlesticks | One daily candle per day, with a pulsing candle for the current UTC day | (always on) |
| ๐ Volume | Raw contributions per day under the chart | volume |
| ๐ Analytics | 10 stats: total, avg/day, active days, current and longest streak, best day, volatility (ฯ), Sharpe, max drawdown, best weekday | stats |
| ๐ฉ Heatmap | Last 26 weeks, weekday ร week | heatmap |
| ๐ Weekly volume | Last 12 weeks, with week-over-week change | weekly |
| ๐๏ธ Monthly close | Last 6 months, with month-over-month change | monthly |
| ๐งพ Ticker tape | A scrolling strip of your key numbers | tape |
| ใฐ๏ธ SMA | A 20-period moving average line | sma |
| ๐ซ๏ธ Bands | A ยฑ2ฯ band around the same 20-period window | bands |
Everything is on by default except bands (use show: all to turn it on).
๐ก The header also shows your Developer Index, a fictional 0 to 1000 score, with a sparkline and a pulsing
LIVEdot.
โก Setup in 3 steps (no server, no hosting)
Step 1: Add a workflow
In your profile repo (USERNAME/USERNAME), create .github/workflows/terminal.yml:
name: Update trading terminal
on:
schedule: [{ cron: '17 */6 * * *' }]
workflow_dispatch:
permissions:
contents: write
jobs:
terminal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hanzlabaig-dev/gh-trading-terminal@v1
with:
days: 90
theme: tradingview
token: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
Step 2: Run it once
Go to the Actions tab โ Update trading terminal โ Run workflow.
It renders and commits two files:
assets/terminal-dark.svgassets/terminal-light.svg
Step 3: Embed it in your profile README.md
This <picture> block follows the viewer's light/dark theme:
<picture>
<source media="(prefers-color-scheme: light)" srcset="assets/terminal-light.svg">
<img src="assets/terminal-dark.svg" width="100%" alt="GitHub contribution trading terminal">
</picture>
If the default token is rejected, use ๐ Want your private contributions included?
read:user scope.GH_PAT.
GH_PAT. That's why the workflow reads secrets.GH_PAT || secrets.GITHUB_TOKEN.
๐๏ธ Action inputs
| input | default | notes |
|---|---|---|
username |
repo owner | any GitHub login |
days |
90 |
14 to 730 |
theme / light-theme
|
tradingview / light
|
tradingview, bloomberg, midnight, light
|
output-dir |
assets |
where the SVGs are written |
show |
all but bands
|
stats,heatmap,weekly,monthly,volume,tape,sma,bands or all
|
extra-args |
(empty) | any CLI flag, e.g. --colorblind true --hide tape --up #00ff88
|
commit |
true |
set false to handle commits yourself |
๐จ The four themes
Theme
Look
tradingviewthe default dark theme (navy background, teal/red candles)
bloombergamber text on pure black, green/red candles
midnightGitHub-dark style palette
lightthe default for
terminal-light.svg
Colorblind mode swaps the candle colors to blue (up) and orange (down): โ ๏ธ Quote the Color flags: โฟ Colorblind mode and custom colors
- uses: hanzlabaig-dev/gh-trading-terminal@v1
with:
extra-args: "--colorblind true --hide tape --up #00ff88"
extra-args value. In YAML, an unquoted # starts a comment, so --up #00ff88 would silently get cut off.--up, --down, --bg. The smoothing factor is --alpha (default 0.5, clamped to 0.1 to 0.9).
๐งฎ How the numbers work
GitHub only exposes daily contribution totals, so real intraday OHLC data does not exist.
Instead, candles are a deterministic mapping of your real counts. Nothing is fabricated.
The "price" is an exponential moving average (EMA) of your daily activity:
level(t) = level(t-1) + alpha * (count(t) - level(t-1))
From that level, each candle is built like this:
open = level(t-1)
close = level(t)
high = max(open, close, count(t), count(t-1))
low = min(open, close, count(t), count(t-1))
- ๐ข green when
close >= open(the day beat the running level) - ๐ด red otherwise
A few details I like:
- Volume is the raw count per day. Huge spikes are clipped to a sensible axis limit and marked with a small triangle, so one monster day can't flatten the whole chart.
- An empty in-progress day does not break your current streak yet. The day isn't over.
- The current UTC day is drawn as a pulsing, translucent candle, because that session is still open.
The Developer Index (0 to 1000)
A rolling 28-day blend of four components. It's fictional, but fully reproducible:
| Component | Weight | How it's computed |
|---|---|---|
| Active-day ratio | 35% | share of days in the window with at least 1 contribution |
| Intensity | 25% |
log(1 + mean) / log(1 + 10), capped at 1 |
| Streak | 20% | current streak รท 14 days, capped at 1 |
| Stability | 20% | 1 - min(1, stdDev / mean / 3) |
Two more stats complete the picture:
- Sharpe = mean รท standard deviation of your daily counts
- Max drawdown = the worst peak-to-trough fall of the Developer Index
โ ๏ธ It's a joke index with real math behind it. Not financial advice, and not a performance review either.
๐งฑ The constraint that shaped everything
GitHub serves README images through an image proxy that blocks scripts, CSS and web fonts. So the SVG is built to survive that:
- โ
plain SVG attributes only (no
<style>, no scripts, no external references) - โ a system monospace font stack
- โ
SMIL for all animation: the pulsing candle, the
LIVEdot and the scrolling tape - โ
works in any
<img>tag - โ self-contained: about 38 KB at 90 days, and still under about 100 KB at the 730-day maximum
The test suite even enforces it: every theme is rendered and asserted to contain no <script>, <style>, <foreignObject> or external URLs.
Other things worth knowing:
- GraphQL allows under a year per query, so longer ranges are chunked automatically (360-day chunks, de-duplicated by date).
- GitHub caches images, so changes can take a few minutes to show. The SVG prints its own
UPDATEDtime. - Commits made by the Action bot don't count as your contributions. (No infinite-green-squares exploit, sorry.)
๐ ๏ธ Other ways to run it
CLI (Node 18.3+, zero dependencies):
git clone https://github.com/hanzlabaig-dev/gh-trading-terminal && cd gh-trading-terminal
npm test
npm run demo # synthetic data, no token needed
GITHUB_TOKEN=xxx node src/cli.js --user YOU --from 2026-01-01 --to 2026-11-22 --theme bloomberg --out terminal.svg
๐ฉ All CLI flags
--user --days --from --to --theme --show --hide
--animate false --colorblind true
--up --down --bg --alpha --demo --out
Live URL (optional): deploy to Vercel, set GITHUB_TOKEN, and use this as the image URL (served by api/terminal.js, cached for 1 hour):
https://YOUR-APP.vercel.app/api/terminal?user=YOU&theme=bloomberg&days=120
โ Tested
npm test runs 6 tests with Node's built-in test runner. They cover candle invariants, streak logic, rendering every theme safely, display toggles and input validation, the chunked GraphQL fetch, and the Action's entrypoint script. CI runs them on Node 18, 20 and 22.
๐ค Contributing
PRs are welcome, and the layout is easy to navigate:
| You want to add... | Look in |
|---|---|
| a new theme | src/themes.js |
| layout changes | src/render.js |
| new metrics | src/analytics.js |
Run npm test before opening a PR.
๐ฌ Try it
- โญ Star the repo: hanzlabaig-dev/gh-trading-terminal
- Drop the workflow into your profile repo
- Tell me in the comments: what's your Developer Index? ๐
Which panel or metric should I add next? Let me know below. ๐
Top comments (2)
Awesome ๐๐ป๐ฎ
thanks ๐