Hosting the badge
The SVG needs a stable URL for your README to reference. Three options, from simplest to most robust:Option 1: Commit to your repo
Generate the badge and commit it directly:Option 2: Publish from CI (recommended)
Add a step to your CI workflow that generates the badge and publishes it to abadges branch:
- GitHub Actions
- GitLab CI
badges branch:Option 3: Shields.io endpoint
If you prefer dynamic badges via shields.io, generate a JSON endpoint file instead:badges branch) and use the shields.io endpoint badge:
Monorepo badges
For workspace packages, scope the badge with--workspace:
Technical details
- Self-contained SVG with embedded Verdana font metrics. No external requests
- Unique element IDs per badge, so you can inline multiple badges on one page
--format badgeautomatically enables--score(no need to pass both)- Exit code 2 with an error message if the score cannot be computed
- Also available via the
FALLOW_FORMAT=badgeenvironment variable