This tool generates a dynamic SVG that shows the top licenses used across your GitHub repositories. It's perfect for showcasing the license distribution in your GitHub profile.
This project is involed in the Summer of Making. Support the project here !
<img src="https://github-licenses-stats.vercel.app/api/top-licenses?username=USERNAME&count=5&theme=dark" alt="Used Licenses">username- Your GitHub usernamecount- Number of licenses to display (default: 5, maximum: 10)theme- Color theme of the badge (default:dark)
A variety of themes are available to customize the appearance of the generated SVGs. You can find the full list of themes along with previews in the Themes.md file.
To update the list of themes dynamically, run the updateThemes.js script located in the scripts folder.
The following licenses are supported with custom colors:
- MIT - MIT License
- ISC - ISC License
- 0BSD - BSD Zero Clause License
- Apache-2.0 - Apache License 2.0
- BSL-1.0 - Boost Software License 1.0
- Zlib - zlib License
- PostgreSQL - PostgreSQL License
- NCSA - University of Illinois/NCSA Open Source License
- BSD-2-Clause - BSD 2-Clause "Simplified" License
- BSD-3-Clause - BSD 3-Clause "New" or "Revised" License
- BSD-3-Clause-Clear - BSD 3-Clause Clear License
- BSD-4-Clause - BSD 4-Clause "Original" or "Old" License
- GPL - GNU General Public License
- GPL-2.0 - GNU General Public License v2.0
- GPL-3.0 - GNU General Public License v3.0
- AGPL-3.0 - GNU Affero General Public License v3.0
- LGPL - GNU Lesser General Public License
- LGPL-2.1 - GNU Lesser General Public License v2.1
- LGPL-3.0 - GNU Lesser General Public License v3.0
- MPL-2.0 - Mozilla Public License 2.0
- EPL-1.0 - Eclipse Public License 1.0
- EPL-2.0 - Eclipse Public License 2.0
- ECL-2.0 - Educational Community License v2.0
- EUPL-1.1 - European Union Public License 1.1
- OSL-3.0 - Open Software License 3.0
- CC - Creative Commons
- CC0-1.0 - Creative Commons Zero v1.0 Universal
- CC-BY-4.0 - Creative Commons Attribution 4.0 International
- CC-BY-SA-4.0 - Creative Commons Attribution Share Alike 4.0 International
- Unlicense - The Unlicense
- WTFPL - Do What The F*ck You Want To Public License
- Artistic-2.0 - Artistic License 2.0
- AFL-3.0 - Academic Free License v3.0
- OFL-1.1 - SIL Open Font License 1.1
- LPPL-1.3c - LaTeX Project Public License v1.3c
- MS-PL - Microsoft Public License
- NOASSERTION - No License Detected
Note: If a license is not in the list above, it will be displayed with a default gray color.
-
Clone the repository
-
Install dependencies:
npm install
-
Run locally:
npm run dev
-
Access at
http://localhost:3000/api/top-licenses?username=YOUR_USERNAME
This project is designed to be deployed on Vercel.
See the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.