github-profile-trophy

GitHub

πŸ† Add dynamically generated GitHub Stat Trophies on your readme

RAW Doc

CONTRIBUTING

Contribution Guide

Environment

- Deno >= v1.36.1
- Vercel
- GitHub API v4
- Docker and Docker compose (optional)

Local Run

Create .env file to project root directory, and write your GitHub token to the
.env file. Please select the authority of repo when creating token.

properties
GITHUB_TOKEN1=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GITHUB_TOKEN2=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

if using GitHub Enterprise:


(this env var defaults to https://api.github.com/graphql)


GITHUB_API=https://github.example.com/api/graphql

Run local server.

sh
deno task start

You can enable the Redis if you want, but it's not mandatory.

sh
docker compose up -d

Rename env-example to .env, and change ENABLE_REDIS to true

Open localhost from your browser.

http://localhost:8080/?username=ryo-ma

Editor config

Read the .editorconfig

Pull Requests

Pull requests are always welcome! In general, they should a single concern in
the least number of changed lines as possible. For changes that address core
functionality, it is best to open an issue to discuss your proposal first. I
look forward to seeing what you come up with!

Run deno lint

What to do before contributing

1. Run deno lint

sh
deno task lint

2. Run deno format

sh
deno task format

3. Run deno test

sh
deno task test

---

README

<div align="center">
<img width="140" src="https://user-images.githubusercontent.com/6661165/91657958-61b4fd00-eb00-11ea-9def-dc7ef5367e34.png" alt="GitHub Profile Trophy"/>
<h2 align="center">GitHub Profile Trophy</h2>
<p align="center">πŸ† Add dynamically generated GitHub Stat Trophies on your README</p>
</div>
<div align="center">

[](https://github.com/ryo-ma/github-profile-trophy/stargazers)
[](https://github.com/ryo-ma/github-profile-trophy/network/members)
[](https://github.com/ryo-ma/github-profile-trophy/issues)
[](https://github.com/ryo-ma/github-profile-trophy/blob/master/LICENSE)
[](https://twitter.com/intent/tweet?text=Add%20dynamically%20generated%20GitHub%20Trophy%20on%20your%20readme%0D%0A&url=https%3A%2F%2Fgithub.com%2Fryo-ma%2Fgithub-profile-trophy)

</div>
<p align="center">
You can use this service for free. I'm looking for sponsors to help us keep up with this service❀️
</p>
<div align="center">
<a href="https://github.com/sponsors/ryo-ma">
<img src="https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4" alt="Sponsor"/>
</a>
</div>

⚠️ Notice from the Project Owner

> Hello everyone,\

I am the owner of this project.

> Currently, due to the increase in users and traffic, the cost of maintaining

this service has become quite high, and it is becoming financially difficult

to sustain.\

As costs continue to rise, there is a possibility that the service may have to

be discontinued.\

We are now at a stage where monetization and financial support are essential.

> Your support in the following ways would be greatly appreciated:

> 1. Financial support: GitHub Sponsors

2. Reducing server load through self-hosting (by forking on GitHub and

deploying to Vercel)

3. Share your github-profile-trophy URL deployed to Vercel for load balancing

(Send email: [email protected] or Pull Request)

Load balancing endpoints

These are endpoints provided by volunteers. Please use these in moderation.

- https://trophygithubreadmelang.cybee.dpdns.org/
by Cyberbee-pro
- https://github-profile-trophy-liard-delta.vercel.app
by Adwitya
- https://github-profile-trophy-fork-two.vercel.app
by hesreallyhim
- https://github-profile-trophy-winning.vercel.app
by hongbo-wei
- https://github-profile-trophy-kannan.vercel.app
by kann4n
- https://trophy.ryglcloud.net by
PracticalRyan
- https://github-profile-trophy-tawny.vercel.app
by vijaypurohit322
- https://github-profile-repo.vercel.app)
by HackyCoder0951
- https://gh-trophy.cdnsoft.net by
cromatikap
- https://trophygh.kolioaris.xyz by
kolioaris
- https://github-profile-trophy-orcin-eta.vercel.app
by manupawick
- https://github-profile-trophy-reiyua-mirror.vercel.app
by reiyua
- https://github-profile-trophy-sigma-one.vercel.app)
by namankoolwal
- https://trophy.benkou.dev/ by
Ben
- https://github-trophies.devomb.com/ by
DevomB
- https://github-profile-trophy-unserori.vercel.app/
by unSerori

Quick Start

Add the following code to your readme. When pasting the code into your profile's
readme, change the ?username= value to your GitHub's username.

text
[](https://github.com/ryo-ma/github-profile-trophy)

<p align="center">
<img src="https://github-profile-trophy.vercel.app/?username=ryo-ma&column=8&rank=SSS,SS,S,AAA,AA,A,B,C" />
</p>

Use theme

Add optional parameter of the theme.

text
[](https://github.com/ryo-ma/github-profile-trophy)

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/92327052-d99b9e00-f091-11ea-9a24-c7ec86982370.png">
</p>

More detail

About Rank

Ranks are SSS SS S AAA AA A B C UNKNOWN SECRET.

| Rank | Description |
| ---------- | ------------------------------------------------------------------------------------------ |
| SSS, SS, S | You are at a hard to reach rank. You can brag. |
| AAA, AA, A | You will reach this rank if you do your best. Let's aim here first. |
| B, C | You are currently making good progress. Let's aim a bit higher. |
| UNKNOWN | You have not taken action yet. Let's act first. |
| SECRET | This rank is very rare. The trophy will not be displayed until certain conditions are met. |

NOTE: The UNKNOWN rank is denoted by ?

Secret Rank

The acquisition condition is secret, but you can see this.

<p align="center">
<img width="110" src="https://github.com/user-attachments/assets/40461f38-a317-431c-93d2-a56c2e803cf3" />
</p>

There are only a few secret trophies. Therefore, if you come up with interesting
conditions, I will consider adding a trophy. I am waiting for contributions.

About Display details

<p align="center">
<img width="220" src="https://user-images.githubusercontent.com/6661165/91642962-6333e600-ea6a-11ea-83af-e371e996bfa6.png" />
</p>

1. Title name of aggregation target.
2. Current rank.
3. Title according to rank.
4. Target aggregation result.
5. Rank progress bar.

Optional Request Parameters

- title
- rank
- column
- row
- theme
- margin-w
- margin-h
- no-bg
- no-frame

Filter by titles

You can filter the display by specifying the titles of trophy.

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&title=Followers

<p align="center">
<img width="110" src="https://user-images.githubusercontent.com/6661165/92317141-80ebe700-f038-11ea-8501-4015bfbb2cf4.png">
</p>

If you want to specify multiple titles.

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&title=Stars,Followers

<p align="center">
<img width="220" src="https://github.com/user-attachments/assets/3b8a1c8b-afcd-49dc-ab18-a439d5c36a83">
</p>

You can also exclude the trophies you don't want to display.

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&title=-Stars,-Followers

Filter by ranks

You can filter the display by specifying the ranks.\
Available values: SECRET SSS SS S AAA AA A B C

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&rank=S

<p align="center">
<img width="110" src="https://user-images.githubusercontent.com/6661165/91642657-1cdd8780-ea68-11ea-994b-4568a55cd22a.png" />
</p>

If you want to specify multiple ranks.

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&rank=S,AAA

<p align="center">
<img width="220" src="https://github.com/user-attachments/assets/0c2ffca8-4b03-4d46-b1d7-4e1eb6702f68">
</p>

You can also exclude ranks.

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&rank=-C,-B

NOTE: Since UNKNOWN is denoted by ?, in order to include or exclude it you
will have to use rank=? and rank=-? respectively

Specify the maximum row & column size

You can specify the maximum row and column size.\
Trophy will be hidden if it exceeds the range of both row and column.

Available value: number type\
Default: column=6 row=3

Restrict only row

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&row=2

Restrict only column

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&column=2

Restrict row & column

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&row=2&column=3

<p align="center">
<img width="330" src="https://user-images.githubusercontent.com/6661165/91659474-c07f7400-eb0a-11ea-84f2-eb6b42547829.png">
</p>

Adaptive column

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&column=-1

You can set column to -1 to adapt the width to the number of trophies, the
parameter row will be ignored.

Apply theme

Available themes.

| theme |
| --------------------------- |
| flat |
| onedark |
| gruvbox |
| dracula |
| monokai |
| chalk |
| nord |
| alduin |
| darkhub |
| juicyfresh |
| buddhism |
| oldie |
| radical |
| onestar |
| discord |
| algolia |
| gitdimmed |
| tokyonight |
| matrix |
| apprentice |
| dark_dimmed |
| dark_lover |
| kimbie_dark |
| aura |

flat

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=flat

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/92325601-039b9300-f087-11ea-983a-fce8133549ee.png">
</p>

onedark

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=onedark

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/92327052-d99b9e00-f091-11ea-9a24-c7ec86982370.png">
</p>

gruvbox

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=gruvbox

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/92315152-e9c56600-f01c-11ea-9536-1bfbb158cfcb.png">
</p>

dracula

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=dracula

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/92490273-c91f2b00-f22b-11ea-9481-b5daae4d7bc3.png">
</p>

monokai

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=monokai

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/93725426-2c289e80-fbea-11ea-96a4-f6490ccf2126.png">
</p>

chalk

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=chalk

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/94294003-1de7d300-ff9a-11ea-91d1-60417a4d919b.png">
</p>

nord

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=nord

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/94346857-7ab2be80-006a-11eb-9082-36d377ae2531.png">
</p>

alduin

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=alduin

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/99085932-2a88bf00-260c-11eb-9b26-d2f125773831.png">
</p>

darkhub

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=darkhub

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/102801126-249ab080-43f8-11eb-91c8-f56f94c35777.png">
</p>

juicyfresh

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=juicyfresh

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/104810094-edbc8c80-5835-11eb-8c20-a76192a00728.png">
</p>

buddhism

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=buddhism

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/113709167-2412f500-971d-11eb-9ee5-0ab292cf8b4c.png">
</p>

oldie

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=oldie

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/113709581-a0a5d380-971d-11eb-8583-770dc4091ebf.png">
</p>

radical

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=radical

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/116633521-adbc8800-a994-11eb-97c4-e45a32721491.png">
</p>

onestar

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=onestar

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/122048400-2af46d00-ce1c-11eb-94e0-c2c6ddaf6819.png">
</p>

discord

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=discord

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/122048628-7dce2480-ce1c-11eb-9792-1e600b384c4d.png">
</p>

algolia

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=algolia

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/131685203-92a31101-2d93-4d18-b24a-d81a8bb012c5.png">
</p>

gitdimmed

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=gitdimmed

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/131685406-799a864f-2691-4840-bb71-1db9c087a507.png">
</p>

tokyonight

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=tokyonight

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/6661165/135482087-27764d6f-53b4-4c2a-8473-32431d12660c.png">
</p>

matrix

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=matrix

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/31789752/141647414-15cfe279-af12-4746-a886-f494c25c096d.png">
</p>

apprentice

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=apprentice

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/31789752/144701036-285cdd4b-d687-4ddc-95c2-7ccae9e25a1f.png">
</p>

dark_dimmed

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=dark_dimmed

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/31789752/147340893-655b9fa5-138f-4f29-91ec-2a17c93822d1.png">
</p>

dark_lover

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=dark_lover

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/31789752/152659041-de5b23cb-1be8-4e6b-b07b-726127ab8c3a.png">
</p>

kimbie_dark

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=kimbie_dark

<p align="center">
<img width="660" src="https://user-images.githubusercontent.com/8161064/288417332-408705a4-ae9c-47fe-af1a-9fb08555f526.png">
</p>

aura

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=aura

<p align="center">
<img width="660" src="https://github.com/user-attachments/assets/18a2266c-9a88-4882-940d-162c0c4d36e0">
</p>

Margin Width

You can put a margin in the width between trophies.\
Available value: number type\
Default: margin-w=0

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&margin-w=15

<p align="center">
<img width="735" src="https://user-images.githubusercontent.com/6661165/93668661-e0ca9f00-fac8-11ea-9bec-325454f49fb4.png">
</p>

Margin Height

You can put a margin in the height between trophies.\
Available value: number type\
Default: margin-h=0

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&margin-h=15

<p align="center">
<img width="110" height="330" src="https://github.com/user-attachments/assets/233dee5b-4491-46cc-884a-39d0aa928752">
</p>

Example layout

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&column=3&margin-w=15&margin-h=15

<p align="center">
<img width="360" src="https://user-images.githubusercontent.com/6661165/93668677-ff309a80-fac8-11ea-8ae3-3e3e8adbef39.png">
</p>

Transparent background

You can turn the background transparent.\
Available value: boolean type (true or false)\
Default: no-bg=false

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&no-bg=true

<p align="center">
<img width="969" src="https://github.com/user-attachments/assets/32d3b63b-7845-42cb-b71c-31abaa673bcb">
</p>

Hide frames

You can hide the frames around the trophies.\
Available value: boolean type (true or false)\
Default: no-frame=false

text
https://github-profile-trophy.vercel.app/?username=ryo-ma&no-frame=true

<p align="center">
<img width="936" src="https://github.com/user-attachments/assets/54de15a3-d907-4a50-8117-170aae74d1cd">
</p>

Generate an svg file localy

Using the render_svg.ts script you can generate your trophys as an svg file
given your username, (Enviroment Vars: See env-example).

Usage:

bash
deno run --allow-net --allow-env --allow-read --allow-write ./render_svg.ts USERNAME OUTPUT_DIR THEME

Generate an svg inside Github CI (Workflow)

Using the provided github action you can easly generate the trophy inside an
github workflow. This eliminates the needs of an online service running but you
have to manualy update rerun the action to update the file.

Usage:

yaml
- name: Generate trophy
uses: Erik-Donath/github-profile-trophy@feature/generate-svg
with:
username: your-username
output_path: trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}

Self-hosting on Vercel

By self-hosting you avoid rate-limits, instances getting paused and you bypass
the #439 issue.

1. For people who do not have this repo forked, you need to do that before you
can deploy anything.

2. Make an account, connect your GitHub account to Vercel, and import your repo.

3. Go back to GitHub, generate a token, and copy it.

4. Set your token scopes to read:user + public_repo (only use repo if you
want private contributions counted).

5. On Vercel's configure screen, add two environment variables and paste the
token as the value of each β€” you can use the same token for both:

text
GITHUB_TOKEN1=your_token
GITHUB_TOKEN2=your_token

6. After that you can deploy it.

7. Set Vercel Authentication -> Only Preview Deployments, or your card shows
blank.

8. You get a domain which you can use/test, it looks something like this:

text
https://<your-app>.vercel.app/?username=USERNAME

Contribution Guide

Check CONTRIBUTING.md for more details.

License

This product is licensed under the
MIT License.

πŸ™ Sponsors

Thank you so much to all the amazing sponsors who support this project! Your
contributions help keep development going and make this work possible.

πŸ’– Monthly Sponsors

- @Leay15 - $10 / month
- @hesreallyhim - $10 / month
- @pmsosa β€” $10 / month
- @chenfeng-huang β€” $10 / month
- @holly-hacker β€” $2 / month
- @skillerious β€” $2 / month (since Aug
17, 2024)
- @LudovicGardy β€” $10 / month (since Aug
15, 2024)
- @alexcastrodev β€” $10 / month (since Oct
13, 2023, previously $50 / month)
- @great-work-told-is β€” $10 / month
(since Apr 12, 2023)
- @Ilithy β€” $5 / month (since Jul 21, 2022)
- @weakish β€” $2 / month (since Jan 22, 2022)
- @Kazuhito00 β€” $2 / month (since Jan 19, 2022)
- @KATO-Hiro β€” $2 / month (since Jan 5, 2022)
- @batazor β€” $2 / month (since Oct 28, 2021)
- @port19x β€” $2 / month (since Jan 27, 2022)

🎁 One-Time Sponsors

- @pronoym99 - $20 (Feb 8, 2026)
- @hesreallyhim - $100 (Jan 11, 2026)
- @Seo-4d696b75 β€” $10 (Jan 4, 2026)
- @massif-01 β€” $5 (December 17, 2025)
- @tapegram β€” $20 (December 6, 2025)
- @WilliamCorotan β€” $5 (November 5, 2025)
- @arnabnandy7 β€” $10 (Oct 3, 2025)
- @JoqarSabon β€” $5 (May 24, 2024)
- @syaghoubi00 β€” $5 (Jan 28, 2024)
- @pylapp β€” $20 (Jan 15, 2024)
- @Dobefu β€” $10 (Dec 22, 2024)
- @michele-lorenzoni β€” $10 (Nov
26, 2024)
- @skillerious β€” $10 (Aug 17, 2024)

---