Overview
GitHub Stats Forge renders GitHub stats as SVG cards.
The cards
Section titled “The cards”Grouped by what a card is about, as the sidebar and the anvil group them.
| Card | Handler | What it shows |
|---|---|---|
| Stats | stats | Commits, PRs, issues, reviews, stars and a rank |
| Top languages | topLangs | The languages you write most, by size or repository count |
| Contributed to | contributedTo | The repositories you contribute to, ranked, and in which years |
| WakaTime | wakatime | Coding time per language |
Repository or gist
Section titled “Repository or gist”| Card | Handler | What it shows |
|---|---|---|
| Repository pin | pin | One repository, so a profile can pin more than six |
| Gist pin | gist | One gist |
Organization
Section titled “Organization”| Card | Handler | What it shows |
|---|---|---|
| Organization | org | Its public repositories, and what they add up to |
| Organization activity | orgActivity | PRs, issues and commits over a rolling window |
Getting a card
Section titled “Getting a card”The GitHub Stats Forge action is the recommended way: it renders your cards on a schedule and commits the SVGs, so nothing has to be up when someone reads your profile.
The CLI writes an SVG next to you, and is how you settle on a card’s options:
npx @stats-forge/github-stats-forge-cliThe library is what the action and the CLI call:
import { CardConfig, stats } from '@stats-forge/github-stats-forge-core/api';
const config = new CardConfig({ pats: [{ name: 'PAT_1', value: process.env.PAT_1 }] });const result = await stats({ username: 'octocat' }, config);Your own server draws a card the moment someone looks at it, and serves this site and the card builder with your real numbers:
docker run -p 9000:9000 --env-file cards.env ghcr.io/stats-forge/github-stats-forge-serverEvery card but WakaTime needs a GitHub token.
Customizing one
Section titled “Customizing one”Every card takes the same colors, borders and title options, one of the built-in themes, and a locale where it has text to translate. Each card page lists what only that card accepts.