Yes, badgers is an ingenious name. It contains the word badge, is similar to badgen (a popular badge generation service), includes the
-rs
suffix 🦀 and it's an actual word! Badgers are awesome animals. And they're also the mascot of the University of Wisconsin-Madison. I don't know why I'm telling you this, I don't even live in the US. But hey, the more you know.
Live instance at badgers.space
badgers
: Core badgers librarybadgers-cli
: CLI for generating SVG badgesbadgers-worker
: Cloudflare workerbadgers-web
: Web frontend for badgers.space
- GitHub
- crates.io
More integrations coming soon!
Paste this template into
badgers-web/.env.local
# Frontend Configuration
NEXT_PUBLIC_API_PROTO = "http" # Worker protocol
NEXT_PUBLIC_API_HOST = "127.0.0.1:8787" # Worker host
NEXT_PUBLIC_WEB_PROTO = "http" # Web frontend protocol
NEXT_PUBLIC_WEB_HOST = "127.0.0.1:3000" # Web frontend host
# API Tokens
GITHUB_TOKEN = "ghp_Foo1234567" # Required for GitHub badges
CRATESIO_TOKEN = "cio51fdR1234567" # Required for crates.io badges
Requires: cargo
cargo test -p badgers
Requires: cargo, npm/yarn
cd badgers-worker
npm run dev # If you're using npm
yarn dev # If you're using yarn
cd badgers-worker
npm run deploy # If you're using npm
yarn deploy # If you're using yarn
Requires: npm/yarn
cd badgers-web
npm install # If you're using npm
yarn # If you're using yarn
cd badgers-web
npm run dev # If you're using npm
yarn dev # If you're using yarn
Over the years, I've used quite a few badge generator services. First shields.io, which became slower and less reliable over time. Then badgen.net, which was fast and reliable at first, but became similarly disfunctional and doesn't seem to be maintained anymore.
Badgers is my attempt at creating a fast, reliable, and easy to use badge generator. It's written in Rust, and uses Cloudflare Workers to serve the badges. On my machine, badge generation takes ~1ms. Cloudflare reports a median CPU time of 2.4ms.
Even though there is an "official" live instance for everyone to use, I encourage you to host your own instance. It's super easy, and you can customize it to your needs.
For now, all that's supported is simple badges, without third-party data sources.
Feel free to contribute!