Open-source GitHub profile stats — one unified, first-party SVG widget for your README.
Third-party widget hosts often fail to render. GH-Stats serves the image from your deployment so embeds stay reliable. Users never paste a GitHub token; private contributions only appear when someone has already enabled them on their public GitHub profile.
- Unified widget: overview, streak, top languages (bars / pie / donut), activity graph
- Combined all-in-one embed or solo blocks for each module
- Choose how many top languages to show (3 / 5 / 8 / 10 / all); remainder folds into Others
- Builder UI: modules, per-module colors, theme presets (including Transparent), border toggle
- Copy Markdown or HTML embed code, plus a share link that reopens the same setup (
/?username=…&modules=…) - Self-hosted
/api/statsSVG endpoint - No end-user OAuth or PATs
npm install
npm run devOpen http://localhost:3000, enter a username, customize, copy the embed.
cp .env.example .env.local
# GITHUB_TOKEN=ghp_... # deployer token for higher API limits
# NEXT_PUBLIC_GITHUB_REPO=https://github.com/you/GH-StatsAfter deploying, use the builder export, or:
| Param | Description |
|---|---|
username |
GitHub login |
modules |
all or comma list: overview,streak,languages,activity (single module = solo widget) |
langs |
bars, pie, or donut (when languages module is on) |
top |
Language count: 3, 5 (default), 8, 10, or all |
show_border |
1 (default) or 0 to hide card/panel borders |
bg text muted border surface |
Canvas colors (hex without #, or transparent) |
c_overview c_streak c_languages c_activity |
Per-module accent colors |
accent |
Legacy alias for c_overview |
GH-Stats reads:
- Public GitHub REST data (profile, repos, languages)
- The public contributions calendar HTML (
/users/{user}/contributions)
If a user enables Include private contributions on my profile, those counts are already public on that calendar. We never request or store visitor credentials.
Language percentages are repo-weighted. For every owned non-fork repo, GitHub's /languages byte breakdown is converted to per-repo fractions (summing to 1), then those fractions are summed across repos and divided by the repo count. A language used in many repos ranks high; one huge codebase can't dominate on raw bytes.
Next.js (App Router) · Tailwind CSS · ArchiveStamp + Space Grotesk · first-party SVG
MIT