Dynamically generated GitHub stats cards for your README.
- Quick Start
- User Cards
- Repository Cards
- Gist Card
- Deployment
- Configuration
- API Documentation
- Support
- Contributing
- Important Notes
- Deploy your instance — follow Deployment until you have a working Workers URL. Verify in a browser:
https://YOUR-INSTANCE.WORKERS.DEV/api?username=YOUR_USERNAME
2. Add this to your README (replace placeholders with your Workers hostname and GitHub username):
Cards keyed by GitHub username.
Display your GitHub statistics including stars, commits, pull requests, and more.
Use a theme:
Custom colors:
Use GitHub's theme context tags for automatic dark/light mode:
[](https://github.com/YOUR_USERNAME)
[](https://github.com/YOUR_USERNAME)See all available themes. All options: API.md — Stats Card.
Display your most frequently used programming languages.
Compact layout:
Donut chart:
All options: API.md — Top Languages Card.
Display GitHub contribution streak statistics with current streak as the hero metric.
Weekly streak mode:
Hide longest streak:
All options: API.md — Streak Card.
Render a GitHub-style contribution heatmap grid.
Custom cell colors:
All options: API.md — Heatmap Card.
Display your WakaTime coding statistics.
Warning
Your WakaTime profile must be public. Enable both "Display code time publicly" and "Display languages, editors, os, categories publicly" in your WakaTime settings.
All options: API.md — WakaTime Card.
Cards keyed by repository owner and name (username + repo).
Pin additional repositories beyond GitHub's 6-repo limit.
All options: API.md — Repository Card.
Render a cumulative commit history sparkline for one repository (like star history), using default-branch commits over the last N days (default 30).
All options: API.md — Sparkline Card.
Display GitHub Gists in your README.
All options: API.md — Gist Card.
- Node.js 22+ (matches this repo's
enginesfield) - GitHub Personal Access Token (PAT) — required. Set
GITHUB_PATas a Worker secret. Scope at GitHub token settings: public stats needread:user; private stats needrepo+read:user(see Important Notes).
- Fork this repository
- Install dependencies:
pnpm install(install pnpm withnpm install -g pnpmif needed) - Configure:
node scripts/generate-wrangler-config.js— thenpnpm wrangler secret put GITHUB_PATfor production - Deploy:
pnpm run deploy— in Workers Builds, usepnpm run deploy(not barewrangler). SetGITHUB_PAT; optional GitHub Actions secrets:CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID - Use
https://YOUR-INSTANCE.WORKERS.DEVin your README embed URLs
| Variable | Description |
|---|---|
GITHUB_PAT |
GitHub PAT (required); add GITHUB_PAT_2, … for more quota |
WHITELIST |
Comma-separated allowed usernames |
CACHE_SECONDS |
Default cache duration in seconds (0 disables) |
Full list: API.md — Environment Variables.
Warning
Redeploy after changing environment variables.
Important
For internet-reachable instances, set WHITELIST to intended usernames. Unset WHITELIST lets any username consume your GitHub quota. If you expose /api/gist, set GIST_WHITELIST to allowed gist IDs.
Use Sync Fork to pull upstream changes; redeploy and re-check secrets after syncing.
[](https://github.com/YOUR_USERNAME)
[](https://github.com/YOUR_USERNAME)Set locale= on any card URL (e.g. &locale=es). Supported codes: API.md — Supported Locales.
Each card type has default cache durations and per-card min/max clamps for cache_seconds; override globally with CACHE_SECONDS. Details: API.md — Cache Durations.
Full reference: API.md, hosted docs, or openapi.yaml.
If something is not working:
- Confirm your Workers URL loads in a browser (see Quick Start)
- Check PAT scopes and private-stats caveats in Important Notes and Deployment
- For WakaTime cards, confirm profile visibility under WakaTime Card
- Open an issue with the failing URL (redact secrets)
Card endpoints return error SVGs (not JSON) for most failures:
| What you see | Likely cause |
|---|---|
| Missing username / parameter error | username (or repo, id) not in the URL |
| User not found | GitHub username typo or organization name used as username |
| Rate limit / downtime message | GitHub API quota exhausted — add GITHUB_PAT_2, tighten WHITELIST, or wait |
| No tokens / PAT message | GITHUB_PAT secret not set on the Worker |
| WakaTime user not found | WakaTime profile or visibility settings (see WakaTime Card) |
Full error shapes: API.md — Error Handling.
Contributions welcome — star the repo, open issues, or send PRs.
Important
This fork is self-host-only — deploy your own Cloudflare Workers instance; there is no shared public demo URL in this repo. The GitHub API allows 5k requests per hour per PAT. Caching reduces repeat GitHub API hits for the same card URL; it does not guarantee staying under the limit when many usernames are requested, caches expire, or CACHE_SECONDS is 0. Set WHITELIST to the usernames you intend to serve, and add GITHUB_PAT_2 (and further) tokens if you need more quota.
Warning
By default, cards only show statistics from public repositories. To include private repository statistics, deploy your own instance with a GitHub Personal Access Token that belongs to the same user as username. Private-repo aggregates rendered this way are still served on the public card URL — treat that as intentional disclosure, restrict the instance with WHITELIST, and do not embed the URL where those totals should stay private. Organization or SSO-restricted private repos may remain invisible even with a PAT.