Need help with lighthouse-badges?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

167 Stars 28 Forks MIT License 841 Commits 0 Opened issues


🚦 Generate badges ( based on Lighthouse performance.

Services available


Need anything else?

Contributors list

Build Status Code Coverage NPM downloads NPM version License

Lighthouse Badges


This package allows you to easily create Lighthouse badges for all Lighthouse categories.
Ever wanted to brag about your sites's awesome Lighthouse performance? Then this is the package for you!


All Badges

Lighthouse Accessibility Badge Lighthouse Best Practices Badge Lighthouse Performance Badge Lighthouse PWA Badge Lighthouse SEO Badge

Single Badge




usage: lighthouse-badges [-h] [-v] [-s]
                         [-b {flat,flat-square,plastic,for-the-badge,popout,popout-square,social}]
                         [-o OUTPUT_PATH] [-r] -u URLS [URLS ...]

Generate gh-badges ( based on lighthouse performance.

Optional arguments: -h, --help Show this help message and exit. -v, --version Show program's version number and exit. -s, --single-badge Output only one single badge averaging all lighthouse categories' scores -b {flat,flat-square,plastic,for-the-badge,popout,popout-square,social}, --badge-style {flat,flat-square,plastic,for-the-badge,popout,popout-square,social} Define look and feel for the badge -o OUTPUT_PATH, --output-path OUTPUT_PATH Define output path for artifacts -r, --save-report Save lighthouse report as html for every supplied url

Required arguments: -u URLS [URLS ...], --urls URLS [URLS ...] The lighthouse badge(s) will contain the respective average score(s) of all the urls supplied, combined

Additionally you can pass parameters to the lighthouse process directly via environment variable:

# This will pass '--preset=desktop' to the lighthouse process
export LIGHTHOUSE_BADGES_PARAMS="--preset=desktop"
lighthouse-badges --urls


Hint: node versions below 12 are not supported.

Option 1: npm

npm i -g lighthouse-badges
lighthouse-badges --urls -o test_results

Option 2: npx

npx lighthouse-badges --urls -o test_results

Option 3: Docker

# Warning, the docker version may alter the lighthouse results
docker run --rm \
    -v $PWD/test_results:/home/chrome/reports \
    emazzotta/lighthouse-badges \
    /bin/sh -c "lighthouse-badges --urls"


See contribution guideline


Sponsored by JetBrains

Jetbrains Logo


Emanuele Mazzotta

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.