{"id":13578003,"url":"https://github.com/emazzotta/lighthouse-badges","last_synced_at":"2025-05-15T20:05:53.814Z","repository":{"id":25911892,"uuid":"106876876","full_name":"emazzotta/lighthouse-badges","owner":"emazzotta","description":"🚦 Generate badges (shields.io) based on Lighthouse performance.","archived":false,"fork":false,"pushed_at":"2025-05-12T17:15:58.000Z","size":7095,"stargazers_count":220,"open_issues_count":3,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-12T18:29:02.250Z","etag":null,"topics":["babel","docker","eslint","gh-badges","javascript","jest","lighthouse","lighthouse-badges","lighthouse-performance","nodejs","npm","travis"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emazzotta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["emazzotta"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.paypal.me/emanuelemazzotta"}},"created_at":"2017-10-13T21:56:47.000Z","updated_at":"2025-05-12T17:16:02.000Z","dependencies_parsed_at":"2023-11-06T08:44:55.921Z","dependency_job_id":"f9547692-75bf-4914-98a7-fb179b49adec","html_url":"https://github.com/emazzotta/lighthouse-badges","commit_stats":{"total_commits":1099,"total_committers":7,"mean_commits":157.0,"dds":"0.24840764331210186","last_synced_commit":"32b1adc2fe88f7e8bb9e69ab48183ebe9f54286e"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emazzotta%2Flighthouse-badges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emazzotta%2Flighthouse-badges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emazzotta%2Flighthouse-badges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emazzotta%2Flighthouse-badges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emazzotta","download_url":"https://codeload.github.com/emazzotta/lighthouse-badges/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414499,"owners_count":22067272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","docker","eslint","gh-badges","javascript","jest","lighthouse","lighthouse-badges","lighthouse-performance","nodejs","npm","travis"],"created_at":"2024-08-01T15:01:26.222Z","updated_at":"2025-05-15T20:05:48.777Z","avatar_url":"https://github.com/emazzotta.png","language":"JavaScript","funding_links":["https://github.com/sponsors/emazzotta","https://www.paypal.me/emanuelemazzotta"],"categories":["JavaScript","TypeScript"],"sub_categories":[],"readme":"[![Build Status](https://github.com/emazzotta/lighthouse-badges/workflows/build/badge.svg)](https://github.com/emazzotta/lighthouse-badges/actions)\n[![Code Coverage](https://codecov.io/gh/emazzotta/lighthouse-badges/branch/master/graph/badge.svg)](https://github.com/emazzotta/lighthouse-badges/actions)\n[![NPM downloads](https://img.shields.io/npm/dt/lighthouse-badges?color=blue)](https://www.npmjs.org/package/lighthouse-badges)\n[![NPM version](https://img.shields.io/npm/v/lighthouse-badges.svg)](https://www.npmjs.org/package/lighthouse-badges)\n[![License](https://img.shields.io/:license-mit-blue.svg?style=flat)](https://emanuelemazzotta.com/mit-license)\n\n# Lighthouse Badges\n\n[![Lighthouse](./assets/img/lighthouse.svg)](https://github.com/GoogleChrome/lighthouse)\n\nThis package allows you to easily create Lighthouse badges for all Lighthouse categories.  \nEver wanted to brag about your sites's awesome Lighthouse performance? Then this is the package for you!  \n\n## Examples\n\n### All Badges\n\n[![Lighthouse Accessibility Badge](./assets/img/scores/lighthouse_accessibility.svg)](https://github.com/emazzotta/lighthouse-badges)\n[![Lighthouse Best Practices Badge](./assets/img/scores/lighthouse_best-practices.svg)](https://github.com/emazzotta/lighthouse-badges)\n[![Lighthouse Performance Badge](./assets/img/scores/lighthouse_performance.svg)](https://github.com/emazzotta/lighthouse-badges)\n[![Lighthouse PWA Badge](./assets/img/scores/lighthouse_pwa.svg)](https://github.com/emazzotta/lighthouse-badges)\n[![Lighthouse SEO Badge](./assets/img/scores/lighthouse_seo.svg)](https://github.com/emazzotta/lighthouse-badges)\n\n### Single Badge\n\n[![Lighthouse](./assets/img/scores/lighthouse.svg)](https://github.com/emazzotta/lighthouse-badges)\n\n## Usage\n\n### Help\n\n```txt\nusage: lighthouse-badges [-h] [-v] [-s] [-b {flat,flat-square,plastic,for-the-badge,social}] [-o OUTPUT_PATH] [-r] -u URL\n\nGenerate gh-badges (shields.io) based on lighthouse performance.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n  -s, --single-badge    Output only one single badge averaging all lighthouse categories' scores\n  -b {flat,flat-square,plastic,for-the-badge,social}, --badge-style {flat,flat-square,plastic,for-the-badge,social}\n                        Define look and feel for the badge\n  -o OUTPUT_PATH, --output-path OUTPUT_PATH\n                        Define output path for artifacts\n  -r, --save-report     Save lighthouse report as html for every supplied url\n\nRequired arguments:\n  -u URL, --url URL     The lighthouse badge(s) will contain the score(s) of all the supplied url\n```\n\nAdditionally, you can pass parameters configurations to the lighthouse process directly via environment variable path to the config file:\n\n```bash\n# The variable name matters, but the path can be anything\nexport LIGHTHOUSE_BADGES_CONFIGURATION_PATH=\"~/.lhb-config.json\" \n\n# \"extends\": \"lighthouse:default\" is needed, the rest is optional\ncat \u003c\u003c EOF \u003e! $LIGHTHOUSE_BADGES_CONFIGURATION_PATH\n{\n  \"extends\": \"lighthouse:default\",\n  \"settings\": {\n    \"extraHeaders\": {\n      \"Authorization\": \"Bearer ...\"\n    },\n    \"onlyCategories\": [\n      \"performance\",\n      \"pwa\"\n    ],\n    \"formFactor\": \"mobile\"\n  }\n}\nEOF\n\nlighthouse-badges --url https://www.youtube.com/\n```\n\nSee [here](https://github.com/GoogleChrome/lighthouse/blob/main/docs/configuration.md) for more configuration examples in the official lighthouse docs.\n\n### Run\n\nnode \u003e= 18 is required.\n\n#### Option 1: npm\n```bash\nnpm i -g lighthouse-badges\nlighthouse-badges --url https://www.youtube.com/ -o test_results\n```\n\n#### Option 2: npx\n```bash\nnpx lighthouse-badges --url https://www.youtube.com/ -o test_results\n```\n\n#### Option 3: Docker\n```bash\n# Warning, the docker version may alter the lighthouse results\ndocker run --rm \\\n    -v $PWD/test_results:/home/chrome/reports \\\n    emazzotta/lighthouse-badges \\\n    /bin/sh -c \"lighthouse-badges --url https://www.youtube.com/\"\n```\n\n### Develop\n\n```bash\nnpm run start # To run the lighthouse-badges code on google.com\n```\n\n## Contributing\n\nSee [contribution guideline](./CONTRIBUTING.md)\n\n## Sponsors\n\nSponsored by [JetBrains](https://www.jetbrains.com/?from=Lighthouse-Badges)\n\n\u003ca href=\"https://www.jetbrains.com/?from=Lighthouse-Badges\"\u003e\n  \u003cimg alt=\"Jetbrains Logo\" src=\"./assets/img/jetbrains.svg\" height=\"100\"\u003e\n\u003c/a\u003e\n\n## Author\n\n[Emanuele Mazzotta](mailto:hello@mazzotta.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femazzotta%2Flighthouse-badges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femazzotta%2Flighthouse-badges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femazzotta%2Flighthouse-badges/lists"}