brainstate

rowkavdev/GitHub-profile-stats · source

Snapshot 0 · 2026-11-04T12:47:28Z · TypeScript · MIT

Content fingerprint1e44f2dc108da6410a039a1ed55a1ccf36545d279e6734b5602b1accc065912a

GitHub description at capture

Beautiful GitHub stats cards for your README — just paste one line.

README at capture

![Users](https://ghstats.dev/api/badge)
![Repo Views](https://ghstats.dev/api/visits?username=rowkav09&repo=GitHub-profile-stats)
[![24h Uptime](https://ghstats.dev/api/status/badge?period=24h)](https://ghstats.dev/status)
[![7d Uptime](https://ghstats.dev/api/status/badge?period=7d)](https://ghstats.dev/status)
[![API Response](https://ghstats.dev/api/status/badge?metric=response)](https://ghstats.dev/status)
[![CodeFactor](https://www.codefactor.io/repository/github/rowkavdev/github-profile-stats/badge)](https://www.codefactor.io/repository/github/rowkavdev/github-profile-stats)

> Live status: [ghstats.dev/status](https://ghstats.dev/status) for API uptime, endpoint health, and response times.

# GitHub Profile Stats -- mini badges, sparklines, and badge styles

Free, real-time GitHub stat cards, badges, and charts -- drop a URL into your README and you're done. No tokens, no setup.

**[ghstats.dev](https://ghstats.dev)**


---

## Copy-paste gallery

**Standard card**

[![](https://ghstats.dev/api/card?username=rowkav09&theme=tokyonight&orgs=rowkavdev)](https://github.com/rowkavdev/GitHub-profile-stats)

```
[![](https://ghstats.dev/api/card?username=YOUR_USERNAME&theme=tokyonight)](https://github.com/rowkavdev/GitHub-profile-stats)
```

**Compact grids (3 / 4 / 6)**

[![](https://ghstats.dev/api/card?username=rowkav09&theme=radical&size=compact&compact_count=3)](https://github.com/rowkavdev/GitHub-profile-stats)
[![](https://ghstats.dev/api/card?username=rowkav09&theme=catppuccin&size=compact&compact_count=4)](https://github.com/rowkavdev/GitHub-profile-stats)
[![](https://ghstats.dev/api/card?username=rowkav09&theme=forest&size=compact&compact_count=6)](https://github.com/rowkavdev/GitHub-profile-stats)

```
[![](https://ghstats.dev/api/card?username=YOUR_USERNAME&theme=radical&size=compact&compact_count=3)](https://github.com/rowkavdev/GitHub-profile-stats)
[![](https://ghstats.dev/api/card?username=YOUR_USERNAME&theme=catppuccin&size=compact&compact_count=4)](https://github.com/rowkavdev/GitHub-profile-stats)
[![](https://ghstats.dev/api/card?username=YOUR_USERNAME&theme=forest&size=compact&compact_count=6)](https://github.com/rowkavdev/GitHub-profile-stats)
```

**Combine an org (`orgs=`)**

Moved your repos into an organisation? Add `orgs=` to count that org's public repos on your card too. Stars, repos and languages are combined. Commits, PRs, issues and streaks stay yours, because GitHub already credits your work in org repos to you.

| Just `rowkav09` | `rowkav09` + `orgs=rowkavdev` |
| --- | --- |
| [![Stars, user only](https://ghstats.dev/api/mini?username=rowkav09&metric=stars&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats) | [![Stars, user plus org](https://ghstats.dev/api/mini?username=rowkav09&orgs=rowkavdev&metric=stars&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats) |
| [![Repos, user only](https://ghstats.dev/api/mini?username=rowkav09&metric=repos&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats) | [![Repos, user plus org](https://ghstats.dev/api/mini?username=rowkav09&orgs=rowkavdev&metric=repos&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats) |

[![](https://ghstats.dev/api/card?username=rowkav09&orgs=rowkavdev&theme=tokyonight)](https://github.com/rowkavdev/GitHub-profile-stats)

```
[![](https://ghstats.dev/api/card?username=YOUR_USERNAME&orgs=YOUR_ORG&theme=tokyonight)](https://github.com/rowkavdev/GitHub-profile-stats)
```

**Languages (bar, stacked, grid, horizontal list, vertical list, donut, vertical donut, compact)**

| Layout              | Preview                                                                                                                                                              | Markdown                                                                                                                                               |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Bar**             | [![Bar layout](https://ghstats.dev/api/langs?username=rowkav09&theme=dracula&layout=bar)](https://github.com/rowkavdev/GitHub-profile-stats)                          | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=dracula&layout=bar)](https://github.com/rowkavdev/GitHub-profile-stats)`               |
| **Stacked**         | [![Stacked layout](https://ghstats.dev/api/langs?username=rowkav09&theme=ocean&layout=stacked)](https://github.com/rowkavdev/GitHub-profile-stats)                    | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=ocean&layout=stacked)](https://github.com/rowkavdev/GitHub-profile-stats)`             |
| **Grid**            | [![Grid layout](https://ghstats.dev/api/langs?username=rowkav09&theme=tokyonight&layout=grid)](https://github.com/rowkavdev/GitHub-profile-stats)                     | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=tokyonight&layout=grid)](https://github.com/rowkavdev/GitHub-profile-stats)`           |
| **Horizontal List** | [![Horizontal list layout](https://ghstats.dev/api/langs?username=rowkav09&theme=radical&layout=horizontal_list)](https://github.com/rowkavdev/GitHub-profile-stats)  | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=radical&layout=horizontal_list)](https://github.com/rowkavdev/GitHub-profile-stats)`   |
| **Vertical List**   | [![Vertical list layout](https://ghstats.dev/api/langs?username=rowkav09&theme=catppuccin&layout=vertical_list)](https://github.com/rowkavdev/GitHub-profile-stats)   | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=catppuccin&layout=vertical_list)](https://github.com/rowkavdev/GitHub-profile-stats)`  |
| **Donut**           | [![Donut layout](https://ghstats.dev/api/langs?username=rowkav09&theme=tokyonight&layout=donut)](https://github.com/rowkavdev/GitHub-profile-stats)                   | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=tokyonight&layout=donut)](https://github.com/rowkavdev/GitHub-profile-stats)`          |
| **Vertical Donut**  | [![Vertical donut layout](https://ghstats.dev/api/langs?username=rowkav09&theme=tokyonight&layout=donut_vertical)](https://github.com/rowkavdev/GitHub-profile-stats) | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=tokyonight&layout=donut_vertical)](https://github.com/rowkavdev/GitHub-profile-stats)` |
| **Compact**         | [![Compact layout](https://ghstats.dev/api/langs?username=rowkav09&theme=tokyonight&layout=compact)](https://github.com/rowkavdev/GitHub-profile-stats)               | `[![](https://ghstats.dev/api/langs?username=YOUR_USERNAME&theme=tokyonight&layout=compact)](https://github.com/rowkavdev/GitHub-profile-stats)`        |

**Mini badges (drop anywhere)**

Any metric, any colour, any style — perfect for sprinkling through a README.

| Metric        | Preview                                                                                                                                                                                  | Markdown                                                                                                                                                                         |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Stars**     | [![Stars badge](https://ghstats.dev/api/mini?username=rowkav09&metric=stars&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)                                      | `[![](https://ghstats.dev/api/mini?username=YOUR_USERNAME&metric=stars&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)`                                  |
| **Commits**   | [![Commits badge](https://ghstats.dev/api/mini?username=rowkav09&metric=commits&color=0ea5e9&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)                     | `[![](https://ghstats.dev/api/mini?username=YOUR_USERNAME&metric=commits&color=0ea5e9&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)`                   |
| **Streak**    | [![Streak badge](https://ghstats.dev/api/mini?username=rowkav09&metric=streak&color=f97316&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)                       | `[![](https://ghstats.dev/api/mini?username=YOUR_USERNAME&metric=streak&color=f97316&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)`                    |
| **Followers** | [![Followers badge](https://ghstats.dev/api/mini?username=rowkav09&metric=followers&label=Community&color=22c55e&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats) | `[![](https://ghstats.dev/api/mini?username=YOUR_USERNAME&metric=followers&label=Community&color=22c55e&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)` |

Pass `label=...` to override the default label text and `style=...` to switch between `flat`, `flat-square`, `for-the-badge`, `plastic`, and `minimal` (see the table below).

**Workflow runs across public repos**

[![Workflow runs](https://ghstats.dev/api/workflows?username=rowkav09&orgs=rowkavdev&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)

`[![Workflow runs](https://ghstats.dev/api/workflows?username=rowkav09&orgs=rowkavdev&style=for-the-badge)](https://github.com/rowkavdev/GitHub-profile-stats)`

`/api/workflows` is currently limited to **Rowan's public repositories**: `username=rowkav09`, with optional `orgs=rowkavdev`. Other usernames and orgs are rejected to protect the shared GitHub API quota. It counts all-time GitHub Actions **workflow runs**, not jobs, including runs by other people in those public repos. Forks are included; private repos are not. For quota safety it refuses a set above 150 public repos rather than publishing a partial total. Use the same `style`, `color`, and `label` controls as mini badges. Fresh snapshots last 24 hours; the edge may serve a stale image for up to two additional days while revalidating, and Redis may serve a last verified count for up to seven days if refreshes fail. Each of the two allowed variants has one upstream attempt per 24 hours, successful or not (at most two bounded sweeps in total). Redis is required: without it the route fails closed rather than polling every repository.

**Badge styles -- pick a look**

| Style           | Preview                                                |
| --------------- | ------------------------------------------------------ |
| `flat`          | ![](https://ghstats.dev/api/badge?style=flat)          |
| `flat-square`   | ![](https://ghstats.dev/api/badge?style=flat-square)   |
| `for-the-badge` | ![](https://ghstats.dev/api/badge?style=for-the-badge) |
| `plastic`       | ![](https://ghstats.dev/api/badge?style=plastic)       |
| `minimal`       | ![](https://ghstats.dev/api/badge?style=minimal)       |

Apply with `?style=for-the-badge` on `/api/mini` or `/api/badge`. Works alongside `color` and `label`.

**Activity sparkline (7--90 days)**

[![](https://ghstats.dev/api/sparkline?username=rowkav09&days=30&width=420)](https://github.com/rowkavdev/GitHub-profile-stats)

```
[![](https://ghstats.dev/api/sparkline?username=YOUR_USERNAME&days=30&width=420)](https://github.com/rowkavdev/GitHub-profile-stats)
```

**Quick colour override**

```
https://ghstats.dev/api/card?username=YOUR_USERNAME&bg=0f0f23&text=cccccc&title_color=ffff66&icon_color=ff6644
```

---

## 30-second setup

1. Create a public repo named **your-username** on GitHub and add a `README.md`.
2. Paste an embed from the gallery above. Done.

Need tweaks? Use the on-page editor to toggle stats, themes, borders, titles, and copy Markdown/HTML instantly.

---

## Options cheat sheet

**Card ( /api/card )**

- `username` (required)
- `alltime=true` (optional; returns all-time commit, PR, issue, and estimated-hours totals)
- `orgs=my-org` (optional; comma list, up to 3; also works on `/api/langs`, `/api/mini` and `/api/profile`) - also counts the public, non-fork repos owned by these accounts. Stars, repo count and languages are combined. Commits, PRs, issues, contributions and streaks stay your own, since GitHub already credits your work in org repos to you. Handy after moving repos into an org.
- `theme` default `default`
- Layout: `size=default|compact`, `compact_count=3|4|6`, `show_emoji=true`
- Visibility: `hide=stars,issues,...`, `show_ring`, `show_icons`, `hide_title`, `hide_border`
- Styling: `bg`, `text`, `title_color`, `icon_color`, `border_color`, `border_radius`, `custom_title`, `order`

**Languages ( /api/langs )**

- `layout=bar|stacked|horizontal_list|vertical_list|grid`, `max_langs` (1--12)
- `hide_border`, `hide_title`, `custom_title`, `border_radius`, theme overrides as above

**Mini badges ( /api/mini )**

- `metric=stars|commits|prs|issues|hours|streak|week|followers|repos|contributions`
- `label` (override text), `color` (value side), `theme` (for errors)
- `style=flat|flat-square|for-the-badge|plastic|minimal` (default `flat`)

**Counter badge ( /api/badge )**

- `style=flat|flat-square|for-the-badge|plastic|minimal` (default `flat`)

**Visits badge ( /api/visits )**

- `style=flat|flat-square|for-the-badge|plastic|minimal` (default `flat`)

> Note: `hours` is currently WIP and is an estimate, not exact tracked coding time.

**Sparkline ( /api/sparkline )**

- `days` (7--90), `width` (180--800), `height` (40--240), `line_color`, `fill_color`, `title`, `hide_border`, `border_radius`

---

## Themes

Default, Light, Radical, Tokyo Night, Dracula, Nord, Gruvbox, Catppuccin, Ocean, Sunset, Forest, Midnight, Night Owl, Solarized, Ayu, Rose Pine, Kanagawa, Material Palenight.

---

## FAQ

- **Token needed?** Yes -- the GitHub GraphQL API requires a valid token. Set `GITHUB_TOKEN`, `GH_TOKEN`, or `GITHUB_ACCESS_TOKEN`.
- **Refresh rate?** Tiered by endpoint so slower-moving badges can stay cached longer while activity-focused embeds refresh sooner.
- **Free?** Yes. MIT licensed.
- **Where to tweak without URLs?** [ghstats.dev/builder](https://ghstats.dev/builder).

## Cache policy

- **`/api/card`** and **activity-oriented mini badges** (`commits`, `prs`, `issues`, `streak`, `week`, `contributions`) are cached for about **30 minutes** at the edge.
- **`/api/langs`**, **`/api/badge`**, and slower-moving mini badges like **`followers`** and **`repos`** are cached for about **6 hours** at the edge.
- **`stars` mini badges** are cached for about **24 hours** at the edge.
- **`/api/visits`** is intentionally uncached so counters increment on every request.

---

## Contributing & support

- PRs welcome -- see [CONTRIBUTING.md](CONTRIBUTING.md).
- Like it? Drop a star on the repo: [GitHub](https://github.com/rowkavdev/GitHub-profile-stats).

---

## License

MIT

## Social card styles

Repository and profile cards default to a plain GitHub-style layout. Use `style=github`, `compact`, `split`, `editorial` or `minimal` for layout changes, independently of `theme=github`, `light`, `dark`, `ocean`, `violet` or `amber`.

Both builders have separate style and theme controls. The selected style is preserved in the SVG, PNG download and markdown embed URLs. Cards show a segmented language bar at the bottom with language names and percentages, based on GitHub language data. Use `show_languages=false` to hide it or `show_avatar=false` to hide the avatar. Empty or unavailable language data is labelled, not replaced by a decorative colour strip. Repository cards show contributors, open issues, stars and forks, like GitHub's native preview.

Existing `type=repo`, `profile` and `compact` URLs use the new layouts; `type=contributions` keeps its contribution graph. Styles are for the repository/profile layouts, not the graph. The compact layout is shorter; other styles have heights matched to their content.

## Live social card examples

[![rowkav09 profile card](https://ghstats.dev/api/profile?username=rowkav09&type=profile&theme=dark)](https://github.com/rowkavdev/GitHub-profile-stats)

[![rowkav09 contribution card](https://ghstats.dev/api/profile?username=rowkav09&type=contributions&theme=dark)](https://github.com/rowkavdev/GitHub-profile-stats)

## Social profile cards

Generate a shareable profile card for posts, portfolios, and profile pages:

```text
https://ghstats.dev/api/profile?repo=octocat/Hello-World&theme=github&type=repo
```

Use the PNG endpoint for LinkedIn and other sites that require an uploaded raster image:

```text
https://ghstats.dev/api/profile/png?username=octocat&theme=dark&type=profile&download=true

# Contribution heatmap
https://ghstats.dev/api/profile/png?username=octocat&theme=dark&type=contributions
```

### Profile card parameters

| Parameter | Values | Default |
| --- | --- | --- |
| `username` | GitHub username (profile card) | required unless `repo` is set |
| `repo` | `owner/name` (repository card) | required unless `username` is set |
| `type` | `repo`, `profile`, `compact`, `contributions` | `repo` |
| `theme` | `github`, `light`, `dark`, `ocean`, `violet`, `amber` | `github` |
| `title` | custom heading, up to 80 characters | generated |
| `subtitle` | custom description, up to 140 characters | generated |
| `show_avatar` | `true`, `false` | `true` |
| `show_languages` | `true`, `false` | `true` |
| `bg`, `panel`, `text`, `muted`, `accent`, `border` | six-digit hex without `#` | theme value |
| `download` | `true` forces attachment download (PNG only) | `false` |

The preset and layout registries are separate, so adding a new colour preset or card type does not require changing the API routes.

## Star History

<a href="https://www.star-history.com/?repos=rowkavdev%2Fgithub-profile-stats&type=timeline&legend=bottom-right">
 <picture>
   <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=rowkavdev/github-profile-stats&type=timeline&theme=dark&legend=bottom-right" />
   <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=rowkavdev/github-profile-stats&type=timeline&legend=bottom-right" />
   <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=rowkavdev/github-profile-stats&type=timeline&legend=bottom-right" />
 </picture>
</a>

### Optional Google Analytics

The hosted site uses GA4 measurement ID `G-ZGXCN93Z7E` only after a visitor accepts optional analytics. Decline and Accept have equal weight. No Google tag or request loads before consent; the Analytics choices control allows withdrawal, clears this site's GA cookies and reloads without the tag. Advertising consent and Google signals stay off. Enhanced measurement is off in the GA4 stream. Manual page views use route classes, not profile/repo names, query strings or referrers. The privacy page explains the choice and the separate existing Vercel measurement. GA4 starts with consenting visits after deployment; it has no retroactive history.

### View-counter retention

Profile and repository view counters expire after 90 days without an increment.
Every view atomically refreshes the retention window and preserves the accumulated
count, including counts on pre-existing keys. Reads do not extend retention.
Inactive counters reset after expiration; active cards keep their totals. No
existing keys are deleted during deployment. Untouched legacy keys have no TTL
until their next view. Retention bounds lifetime, not the number of requests an
attacker can make inside the 90-day window.