https://github.com/hossain-khan/trmnl-badges
Simple service to generate GitHub badges for TRMNL Recipe/Plugin
https://github.com/hossain-khan/trmnl-badges
badge-generator github-badge trmnl trmnl-plugin trmnl-recipe
Last synced: 5 months ago
JSON representation
Simple service to generate GitHub badges for TRMNL Recipe/Plugin
- Host: GitHub
- URL: https://github.com/hossain-khan/trmnl-badges
- Owner: hossain-khan
- License: mit
- Created: 2026-02-14T13:40:29.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-03-06T22:30:42.000Z (5 months ago)
- Last Synced: 2026-03-06T22:39:48.143Z (5 months ago)
- Topics: badge-generator, github-badge, trmnl, trmnl-plugin, trmnl-recipe
- Language: HTML
- Homepage: https://hossain-khan.github.io/trmnl-badges/
- Size: 2.12 MB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/hossain-khan/trmnl-badges/actions/workflows/ci.yml)
[](https://codecov.io/github/hossain-khan/trmnl-badges) [](https://trmnl-badges.gohk.xyz/health) [](https://hossain-khan.github.io/trmnl-badges/) [](https://github.com/hossain-khan/trmnl-badges/releases)
# TRMNL Badges
Dynamic SVG badges displaying statistics for [TRMNL](https://trmnl.com/) [recipes](https://trmnl.com/recipes).
Features
- ⚡️ Fast badge generation using Cloudflare Workers edge network
- 🎨 Official TRMNL brand styling and colors
- 📊 Display recipe statistics (installs, forks, connections)
- 🎭 Author badges with combined stats across all recipes
- 🔄 Real-time data from TRMNL API
- 🎯 Simple integration with markdown and HTML
- 📏 Compact number formatting support
- ⏱️ Badges cached for 1 hour (errors cached for 60 seconds)
- 🏷️ SVG badges generated with [badgen](https://github.com/badgen/badgen)
> [!NOTE]
> 🎨 **Try the Interactive Badge Builder** 🛠️
> Use our 👷 **[TRMNL Badge Builder](https://hossain-khan.github.io/trmnl-badges/)** 🧰 for an easy, visual way to create and customize badges with live previews.
> 👤 **New!** Try the **[Author Badge Builder](https://hossain-khan.github.io/trmnl-badges/author-badge.html)** to generate combined badges for all your recipes.
## Usage
Add badges to your TRMNL recipe documentation using Markdown or HTML.
### Finding Your Recipe ID
Your recipe ID can be found in the URL of your [recipe page](https://trmnl.com/recipes) on TRMNL:
```
https://trmnl.com/recipes/28496
^^^^^
(Recipe ID)
```
### Badge Examples
| Badge Type | Code | Preview |
| ----------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| **Installs** | `` |  |
| **Forks** | `` |  |
| **Connections** | `` |  |
| **Pretty Format** | `` |  |
| **Custom Label** | `` |  |
| **Linked Badge** | `[](https://trmnl.com/recipes/28496)` | [](https://trmnl.com/recipes/28496) |
| **Customizations** | `` |  |
## Badge URL Query Parameters
- **`recipe`** (required\*) - TRMNL recipe ID (e.g., `28496`)
- **`userId`** (required\*) - TRMNL author/user ID for combined stats (e.g., `364`)
- **`label`** (optional) - Custom label text (eg. `?label=Downloads` or `?label=Download%20Count`)
- **`pretty`** (optional) - Format numbers in compact notation (e.g., `1.78K`)
- **`glyph`** (optional) - TRMNL logo variant: `brand` (default), `black`, or `white`
- **`color`** (optional) - Badge value background color as a hex code without `#` (default: `F8654B` — TRMNL orange, e.g., `&color=959393`)
- **`labelColor`** (optional) - Badge label background color as a hex code without `#` (default: `3D3D3E` — TRMNL dark gray, e.g., `&labelColor=4EBC91`)
- **`scale`** (optional) - Badge scale multiplier as a positive number (default: `1`, e.g., `&scale=2` for 2x size)
\* Either `recipe` or `userId` is required. Use `recipe` for single recipe badges, `userId` for author badges.
> [!TIP]
> Use the **[TRMNL Badge Builder](https://hossain-khan.github.io/trmnl-badges/)** to generate badge markup, or the **[Author Badge Builder](https://hossain-khan.github.io/trmnl-badges/author-badge.html)** for author badges.
### HTML Usage
```html
```
Examples
### Installs Badge
```
https://trmnl-badges.gohk.xyz/badge/installs?recipe=28496
```
### Forks Badge
```
https://trmnl-badges.gohk.xyz/badge/forks?recipe=28496
```
### Connections Badge
```
https://trmnl-badges.gohk.xyz/badge/connections?recipe=28496
```
### Badge with Pretty Formatting (e.g., 2.7K)
```
https://trmnl-badges.gohk.xyz/badge/installs?recipe=28496&pretty
```
### Custom Label
```
https://trmnl-badges.gohk.xyz/badge/installs?recipe=28496&label=Download%20Count
```
### Scaled Badge (2x size)
```
https://trmnl-badges.gohk.xyz/badge/installs?recipe=28496&scale=2
```
## Author Badges
Author badges display **combined statistics** across all recipes published by a TRMNL user. Use the `userId` parameter instead of `recipe`.
### Finding Your User ID
Your user ID can be found by using the [Badge Builder](https://hossain-khan.github.io/trmnl-badges/) — enter any of your recipe URLs and your user ID will be detected automatically.
### Author Badge Examples
| Badge Type | Code | Preview |
| ------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Recipes** | `` |  |
| **Total Installs** | `` |  |
| **Total Forks** | `` |  |
| **Total Connections** | `` |  |
| **Pretty Format** | `` |  |
### Author Badge HTML Usage
```html
```
> [!TIP]
> Use the **[Author Badge Builder](https://hossain-khan.github.io/trmnl-badges/author-badge.html)** for a visual way to generate author badges with live previews and per-recipe breakdowns.
## Contributing
For developers interested in contributing or running this project locally, see [CONTRIBUTING.md](CONTRIBUTING.md).