* docs: add github action as recommended usage method (#3)
Add new github action as recommended usage method now that we are no
longer sponsored by vercel and the hosted endpoint is not available
anymore.
Co-authored-by: Ulysses Zhan <UlyssesZhan@gmail.com>
Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
* docs: ensure example cards render correctly (#4)
Use my deployed environment so example cards render properly and are not
rate-limited by the public instance.
* fix docs links, prepare workflows, update action example
* fix formatting
* docs(theme): auto update theme readme (#5)
Co-authored-by: GitHub Readme Stats Bot <no-reply@githubreadmestats.com>
* ci(deps): Bump stefanzweifel/git-auto-commit-action from 7.0.0 to 7.1.0 (#6)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/28e16e81777b558cc906c8750092100bbb34c5e3...04702edda442b2e678b25b537cec683a1493fcb9)
---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
dependency-version: 7.1.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ci(deps): Bump actions/setup-node from 6.1.0 to 6.2.0 (#7)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/395ad3262231945c25e8478fd5baf05154b1d79f...6044e13b5dc448c55e2357c09f80417699197238)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-version: 6.2.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): Bump prettier from 3.7.4 to 3.8.0 (#13)
Bumps [prettier](https://github.com/prettier/prettier) from 3.7.4 to 3.8.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.7.4...3.8.0)
---
updated-dependencies:
- dependency-name: prettier
dependency-version: 3.8.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): Bump eslint-plugin-jsdoc from 61.5.0 to 62.0.1 (#12)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 61.5.0 to 62.0.1.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v61.5.0...v62.0.1)
---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
dependency-version: 62.0.1
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): Bump globals from 16.5.0 to 17.0.0 (#9)
Bumps [globals](https://github.com/sindresorhus/globals) from 16.5.0 to 17.0.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.5.0...v17.0.0)
---
updated-dependencies:
- dependency-name: globals
dependency-version: 17.0.0
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* docs: add github action as recommended usage method (#4716)
* docs: add github action as recommended usage method
Add new github action as recommended usage method now that we are no
longer sponsored by vercel and the hosted endpoint is not available
anymore.
Co-authored-by: Ulysses Zhan <UlyssesZhan@gmail.com>
Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
* docs: improve action section
---------
Co-authored-by: Ulysses Zhan <UlyssesZhan@gmail.com>
Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
* docs: add instructions to make PAT environment variable sensitive in Vercel deployment (#14)
Added instructions for setting environment variables securely.
Signed-off-by: Joey Chen <142381267+JoeyC-Dev@users.noreply.github.com>
* Fix default theme fallback when an invalid theme is passed (#15)
* fix(color): invalid theme fallback to default
Fixes: #4641
* test(color): add test case for invalid theme fallback to default
* style(color): add back the tab space
* test(color): fix color default theme
* fix(color): use 'in' instead of '.hasOwnProperty'
* fix new test
* format code
---------
Co-authored-by: mikyll <righi.michy@gmail.com>
* fix tests, add CI, fix on mac, extend docs (#25)
* tests: fix float problems and PAT problem
* extend CONTRIBUTING.md
* extend build documentation, add GH action, fix build on MacOS
* fix build on Vercel
* update .gitignore and CONTRIBUTING.md
* fix all tests
* add backend tests to CI
* make e2e tests work
* add debug log to e2e test
* ignore copied tests in CI
* feature(top langs card): add ability to change progress bar background color in normal layout (#16)
* #3307 enhancement : prog_bg_color query added to change the background of progress bar
* #3066 bug Fixed : readme.md file as stated
* #3066 bug Fixed : readme.md file as stated"
* #3066 bug Fixed : readme.md file as stated
* fix types.d.ts
* add test
---------
Co-authored-by: krishnoit <krishnoit100@gmail.com>
Co-authored-by: krishna seth <75961965+a-s-t-e-y-a@users.noreply.github.com>
* allow triggering workflows manually (#17)
* refactor: update languages JSON (#18)
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
* remove remaining barrel files
* ci(deps): Bump actions/checkout from 6.0.1 to 6.0.2 (#19)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/8e8c483db84b4bee98b60c0593521ed34d9990e8...de0fac2e4500dabe0009e67214ff5f5447ce83dd)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 6.0.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): Bump prettier from 3.8.0 to 3.8.1 (#22)
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.0...3.8.1)
---
updated-dependencies:
- dependency-name: prettier
dependency-version: 3.8.1
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): Bump globals from 17.0.0 to 17.1.0 (#23)
Bumps [globals](https://github.com/sindresorhus/globals) from 17.0.0 to 17.1.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.0.0...v17.1.0)
---
updated-dependencies:
- dependency-name: globals
dependency-version: 17.1.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ci(deps): Bump peter-evans/create-pull-request from 8.0.0 to 8.1.0 (#21)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 8.0.0 to 8.1.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/98357b18bf14b5342f975ff684046ec3b2a07725...c0f553fe549906ede9cf27b5156039d195d2ece0)
---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
dependency-version: 8.1.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): Bump eslint-plugin-jsdoc from 62.0.1 to 62.4.0 (#20)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 62.0.1 to 62.4.0.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v62.0.1...v62.4.0)
---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
dependency-version: 62.4.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Revert "remove remaining barrel files"
This reverts commit 31df917cbf.
* fix formatting
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Joey Chen <142381267+JoeyC-Dev@users.noreply.github.com>
Co-authored-by: Rick Staa <rick.staa@outlook.com>
Co-authored-by: Ulysses Zhan <UlyssesZhan@gmail.com>
Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: GitHub Readme Stats Bot <no-reply@githubreadmestats.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joey Chen <142381267+JoeyC-Dev@users.noreply.github.com>
Co-authored-by: mikyll <righi.michy@gmail.com>
Co-authored-by: krishnoit <krishnoit100@gmail.com>
Co-authored-by: krishna seth <75961965+a-s-t-e-y-a@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
10 KiB
Deploy on your own
Since the GitHub API only allows a limited number of requests per hour, my https://github-stats-extended.vercel.app/api could possibly hit the rate limiter. If you deploy it yourself via GitHub Actions or your own hosted instance, then you do not have to worry about anything. Also, if you don't want to give my GitHub-Stats-Extended instance access to your private contributions but still want to include these contributions in your stats, you can simply host your own instance.
GitHub Actions is the simplest setup with static SVGs stored in your repo but less frequent updates, while self-hosting takes more work and can serve fresher stats (with caching).
GitHub Actions
GitHub Actions generates static SVGs and avoids per-request API calls. By default it uses GITHUB_TOKEN (public stats only), for private stats, set a PAT as a secret and pass it to the action instead.
Create /.github/workflows/grs.yml in your profile repo (USERNAME/USERNAME):
name: Update README cards
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate stats card
uses: readme-tools/github-readme-stats-action@v1
with:
card: stats
options: username=${{ github.repository_owner }}&show_icons=true
path: profile/stats.svg
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit cards
run: |
git config user.name "github-actions"
git config user.email "github-actions@users.noreply.github.com"
git add profile/*.svg
git commit -m "Update README cards" || exit 0
git push
Then embed from your profile README:

See more options and examples in the GitHub Readme Stats Action README.
Self-hosted (Vercel/Other)
Running your own instance avoids public rate limits and gives you full control over caching, tokens, and private stats.
First step: get your Personal Access Token (PAT)
For deploying your own instance of GitHub Stats Extended, you will need to create a GitHub Personal Access Token (PAT). Below are the steps to create one and the scopes you need to select for both classic and fine-grained tokens.
Selecting the right scopes for your token is important in case you want to display private contributions on your cards.
Classic token
- Go to Account -> Settings -> Developer Settings -> Personal access tokens -> Tokens (classic).
- Click on
Generate new token -> Generate new token (classic). - Scopes to select:
- repo
- read:user
- Click on
Generate tokenand copy it.
- Click on
Fine-grained token
Warning
This limits the scope of commits to public repositories only.
- Go to Account -> Settings -> Developer Settings -> Personal access tokens -> Fine-grained tokens.
- Click on
Generate new token -> Generate new token. - Enter a token name
- Select an expiration date
- Select
All repositories - Scopes to select under
Permissions:- Commit statuses: read-only
- Contents: read-only
- Issues: read-only
- Metadata: read-only (added automatically when selecting above scopes)
- Pull requests: read-only
- Click on
Generate tokenand copy it.
- Click on
On Vercel
📽️ Check Out Step By Step Video Tutorial By @codeSTACKr
Click on the deploy button to get started!
🛠️ Recommended: Step-by-step guide on setting up your own Vercel instance
- Go to vercel.com.
- Click on
Log in.
- Sign in with GitHub by pressing
Continue with GitHub.
- Sign in to GitHub and allow access to all repositories if prompted.
- Fork this repo.
- Go back to your Vercel dashboard.
- To import a project, click the
Add New...button and select theProjectoption.
- Search for the forked Git Repository and import it by clicking the
Importbutton. - Create a Personal Access Token (PAT) as described in the previous section.
- Add the PAT as an environment variable named
PAT_1(as shown).
Note: For enhanced security, you can add a variable as a sensitive variable. To do this:
- As
Root directoryselect theapps/backendfolder. - Click deploy, and you're good to go. See your domains to use the API!
- optional: add an SQL database; by using e.g. the "Nile" integration or by manually setting the environment variable
POSTGRES_URL - optional: create your own OAuth App and set environment variables
OAUTH_REDIRECT_URI,OAUTH_CLIENT_IDandOAUTH_CLIENT_SECRETon Vercel accordingly - optional: in addition to the Vercel project based on the
apps/backendfolder, create a second project based on theapps/frontendfolder. No environment variables needed.
On other platforms
Warning
This way of using GitHub-Stats-Extended is not officially supported and was added to cater to some particular use cases where Vercel could not be used (e.g. #2341). The support for this method, therefore, is limited.
🛠️ Step-by-step guide for deploying on other platforms
- Fork or clone this repo as per your needs
- Move
expressfrom the devDependencies to the dependencies section ofpackage.jsonhttps://github.com/anuraghazra/github-readme-stats/blob/ba7c2f8b55eac8452e479c8bd38b044d204d0424/package.json#L54-L61 3. Runnpm iif needed (initial setup) 4. Runnode express.jsto start the server, or set the entry point toexpress.jsinpackage.jsonif you're deploying on a managed service https://github.com/anuraghazra/github-readme-stats/blob/ba7c2f8b55eac8452e479c8bd38b044d204d0424/package.json#L11 5. You're done 🎉
Available environment variables
GitHub Readme Stats provides several environment variables that can be used to customize the behavior of your self-hosted instance. These include:
| Name | Description | Supported values |
|---|---|---|
CACHE_SECONDS |
Sets the cache duration in seconds for the generated cards. This variable takes precedence over the default cache timings for the public instance. If this variable is not set, the default cache duration is 24 hours (86,400 seconds). | Any positive integer or 0 to disable caching |
WHITELIST |
A comma-separated list of GitHub usernames that are allowed to access your instance. If this variable is not set, all usernames are allowed. | Comma-separated GitHub usernames |
GIST_WHITELIST |
A comma-separated list of GitHub Gist IDs that are allowed to be accessed on your instance. If this variable is not set, all Gist IDs are allowed. | Comma-separated GitHub Gist IDs |
EXCLUDE_REPO |
A comma-separated list of repositories that will be excluded from stats and top languages cards on your instance. This allows repository exclusion without exposing repository names in public URLs. This enhances privacy for self-hosted instances that include private repositories in stats cards. | Comma-separated repository names |
FETCH_MULTI_PAGE_STARS |
Enables fetching all starred repositories for accurate star counts, especially for users with more than 100 repositories. This may increase response times and API points usage, so it is limited to 10 fetches - i.e. 1000 repos - on the public instance. | true or false or a maximum number of fetches |
See the Vercel documentation on adding these environment variables to your Vercel instance.
Warning
Please remember to redeploy your instance after making any changes to the environment variables so that the updates take effect. The changes will not be applied to the previous deployments.
Keep your fork up to date
You can keep your fork, and thus your private Vercel instance up to date with the upstream using GitHub's Sync Fork button. You can also use the pull package created by @wei to automate this process.
As a prerequisite, GitHub has to know that your personal GitHub-Stats-Extended repo is a fork of https://github.com/stats-organization/github-stats-extended. This only works if you follow the "Step-by-step guide on setting up your own Vercel instance" above, instead of clicking the Vercel "Deploy" button above.


