🚦Generate gh-badges (shields.io) based on Lighthouse performance.
Clone or download
Latest commit 759774e Jan 5, 2019


Codacy Badge Build Status Code Coverage Dependencies Greenkeeper badge 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 (shields.io) 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


# Option 1: npm
npm i -g lighthouse-badges && \
    mkdir test_results && \
    lighthouse-badges --urls https://www.youtube.com/ https://www.youtube.com/feed/trending -o test_results

# Option 2: Docker
docker run --rm \
    -v $PWD/test_results:/home/chrome/reports \
    emazzotta/lighthouse-badges \
    /bin/sh -c "lighthouse-badges --urls https://www.youtube.com/ https://www.youtube.com/feed/trending"


See contribution guideline


Emanuele Mazzotta