A GitHub profile stats generator built on top of @AnuragHazar's Readme Stats. Includes Stats Card, Repo Card, Streak Card, Gist Card, Top Languages Card, and WakaTime Card with adjusted cache_seconds.
This is anuraghazra 's GitHub Readme Stats Version with Extra Streak Card!
Get dynamically generated GitHub stats on your READMEs!
[!NOTE]
This is Github Readme Stats Version with Extra Streak Card and Svg caching.
Copy and paste this into your markdown, and that's it. Simple!
Change the ?username= value to your GitHub username.
[](https://github.com/pranesh-2005/github-readme-stats-fast)
[!WARNING]
By default, the stats card only shows statistics like stars, commits, and pull requests from public repositories. To show private statistics on the stats card, you should deploy your own instance using your own GitHub API token.
[!WARNING]
I’m using Vercel’s free tier for deployment. Due to limited CPU resources, the cards are cached for a certain period. The exact cache timings are provided below—please refer to them accordingly.
| Card Name | Example API URL | Cache Duration | Stale-While-Revalidate |
|---|---|---|---|
| User Stats Card | api?username=Pranesh-2005 | 1 day | 1 day |
| Top Languages Card | api/top-langs?username=Pranesh-2005 | 1 day | 1 day |
| Streak Card | api/streak?username=Pranesh-2005 | 1 hour | 1 hour |
| WakaTime Card | api/wakatime?username=PraneshJs | 1 day | 1 day |
| Repo Pin Card | api/pin?username=Pranesh-2005&repo=github-readme-stats-fast | 7 days | 7 days |
| Gist Card | api/gist?id=1345eef09799d4e6ac4c9cce08805875 | 7 days | 7 days |
[!NOTE]
The same duration is used for the browser cache (max-age) and the CDN cache (s-maxage). Once the cache duration expires, the card is still served instantly from cache for thestale-while-revalidatewindow above, while a fresh copy is fetched in the background—so a card can be up to twice the listed duration old before the new version is served.
[!NOTE]
Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the Japanese academic grading system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars, and followers), based on the cumulative distribution function of the exponential and the log-normal distributions. The implementation can be investigated at src/calculateRank.js. The circle around the rank shows 100 minus the global percentile.
You can pass a query parameter &hide= to hide any specific stats with comma-separated values.
Options:
&hide=stars,commits,prs,issues,contribs
:
PAT_1=ghp_your_token
Run the local server and open a card in your browser:
node express.js
# http://localhost:9000/?username=<you>
# http://localhost:9000/streak?username=<you>
# http://localhost:9000/top-langs?username=<you>
npm test # all tests must pass
npm run lint # no warnings
npm run format # prettier
Fixes #123).npm test -- -u and mention it in the PR.Readme.md next to the card they belong to.| Path | What lives there |
|---|---|
api/ | One serverless handler per card (index.js = stats, streak.js, pin.js, ...) |
src/fetchers/ | GitHub API calls and data processing |
src/cards/ | SVG rendering |
src/common/ | Shared helpers: colours, i18n, caching, retries |
themes/ | Theme colour definitions |
tests/ | Jest tests, one file per card / fetcher |
Card labels are translated in src/translations.js. To add a language, add your locale code
to each label you can translate, then check it with ?locale=<code>. Partial translations are
fine: untranslated labels fall back to English.
Add a theme to themes/index.js with title_color, icon_color, text_color, bg_color
and border_color, and add a preview row for it to themes/README.md.