{"id":14384376,"url":"https://github.com/mikestead/lighthouse-batch","last_synced_at":"2025-04-04T19:13:39.489Z","repository":{"id":43522980,"uuid":"82432176","full_name":"mikestead/lighthouse-batch","owner":"mikestead","description":"Run Lighthouse analysis over multiple sites in a single command","archived":false,"fork":false,"pushed_at":"2024-08-12T15:12:43.000Z","size":252,"stargazers_count":158,"open_issues_count":15,"forks_count":45,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T18:17:33.442Z","etag":null,"topics":["audit","developer-tools","javascript","lighthouse","performance","performance-analysis","performance-metrics","pwa","web"],"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/mikestead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2017-02-19T03:19:47.000Z","updated_at":"2025-03-06T15:31:52.000Z","dependencies_parsed_at":"2024-10-30T18:10:47.748Z","dependency_job_id":null,"html_url":"https://github.com/mikestead/lighthouse-batch","commit_stats":{"total_commits":82,"total_committers":9,"mean_commits":9.11111111111111,"dds":0.5487804878048781,"last_synced_commit":"07c8f2c79ec5c3e7ce29b509683290a0bf41c0f3"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestead%2Flighthouse-batch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestead%2Flighthouse-batch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestead%2Flighthouse-batch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikestead%2Flighthouse-batch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikestead","download_url":"https://codeload.github.com/mikestead/lighthouse-batch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"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":["audit","developer-tools","javascript","lighthouse","performance","performance-analysis","performance-metrics","pwa","web"],"created_at":"2024-08-28T18:01:20.486Z","updated_at":"2025-04-04T19:13:39.458Z","avatar_url":"https://github.com/mikestead.png","language":"JavaScript","readme":"## Lighthouse Batch Reporter\n\nSupports executing\n[Lighthouse](https://developers.google.com/web/tools/lighthouse) analysis over a\nnumber of sites in sequence and generating a summary report including all of\ntheir scores. Scores are calculated from the average score between Performance,\nPWA, Accessibility and Best Practice and SEO sections.\n\nAlso writes out the full `json` report for each site and optionally an `html`\nreport too.\n\n\n\u003e Lighthouse Batch v7+ requires Node v12+. This is a requirement\n\u003e from the dependency on Lighthouse v7+.\n\n## CLI\n\nExample usage\n\n    npx lighthouse-batch -s https://www.bbc.com,https://housing.com\n\nor install globally before use\n\n    npm install lighthouse-batch -g\n    lighthouse-batch -s https://www.bbc.com,https://housing.com\n\nThis will generate the following files under the `./report/lighthouse` folder.\n\n    www_bbc_com.report.json   // Full results for bbc.com\n    housing_com.report.json   // Full results from housing.com\n    summary.json              // Summary of results with scores out of 100\n\nExample `summary.json`\n\n```json\n[\n  {\n    \"url\": \"https://www.bbc.com\",\n    \"name\": \"www_bbc_com\",\n    \"file\": \"www_bbc_com.report.json\",\n    \"score\": \"0.64\",\n    \"detail\": {\n      \"performance\": 0.36,\n      \"accessibility\": 0.87,\n      \"best-practices\": 0.71,\n      \"seo\": 0.96,\n      \"pwa\": 0.31\n    }\n  },\n  {\n    \"url\": \"https://housing.com\",\n    \"name\": \"housing_com\",\n    \"file\": \"housing_com.report.json\",\n    \"score\": \"0.71\",\n    \"detail\": {\n      \"performance\": 0.42,\n      \"accessibility\": 0.78,\n      \"best-practices\": 0.93,\n      \"seo\": 0.97,\n      \"pwa\": 0.46\n    }\n  }\n]\n```\n\nThere's the option to read site urls from a text file, one per line.\n\n    lighthouse-batch -f sites.txt\n\nExample `sites.txt`:\n\n```text\nhttps://www.bbc.com\nhttps://housing.com\n```\n\nIf you want html reports include the `--html` option.\n\n    housing_com.report.html\n    www_bbc_com.report.html\n\nOr add the `--csv` option for csv reports.\n\n    housing_com.report.csv\n    www_bbc_com.report.csv\n\nYou can specify budget thresholds for primary metrics. If any are not met the run will fail.\n\n    lighthouse-batch -s https://web.dev \\\n        --score 92 \\\n        --seo 95 \\\n        --pwa 85 \\\n        --best-practices 90 \\\n        --accessibility 100 \\\n        --fail-fast\n\nThe `--fail-fast` option will error as soon as a budget is not met \nand skip pending sites.\n\n#### All options\n\n```console\nlighthouse-batch [options]\n\nOptions:\n  -V, --version                 output the version number\n  -s, --sites [sites]           a comma delimited list of site urls to analyze with Lighthouse\n  -f, --file [path]             an input file with a site url per-line to analyze with Lighthouse\n  -p, --params \u003cparams\u003e         extra parameters to pass to lighthouse cli for each execution e.g. -p \"--perf --quiet\"\n  -h, --html                    generate an html report alongside the json report\n  --csv                         generate a csv report alongside the json report\n  -o, --out [out]               the output folder to place reports, defaults to './report/lighthouse'\n  --score \u003cthreshold\u003e           average score for each site to meet (1-100)\n  --accessibility \u003cthreshold\u003e   accessibility score for each site to meet (1-100)\n  --best-practices \u003cthreshold\u003e  best practices score for each site to meet (1-100)\n  --seo \u003cthreshold\u003e             seo score for each site to meet (1-100)\n  --pwa \u003cthreshold\u003e             pwa score for each site to meet (1-100)\n  --fail-fast                   fail as soon as a budget threshold is not met\n  -g, --use-global              use a global lighthouse install instead of the dependency version\n  -v, --verbose                 enable verbose logging\n  --no-report                   remove individual json reports for each site\n  --print                       print the final summary to stdout\n  --help                        output usage information\n```\n\n## Notes\n\n- Chrome is run with the following flags to support the widest set of execution\n  environments, including docker containers\n  `--chrome-flags=\"--no-sandbox --headless --disable-gpu\"`. You can replace\n  these with your own by passing `--chrome-flags` as extra parameters. e.g.\n\n  `--params \"--chrome-flags=\\\"--no-sandbox --disable-gpu\\\"\"`\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikestead%2Flighthouse-batch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikestead%2Flighthouse-batch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikestead%2Flighthouse-batch/lists"}