GoogleChrome/lighthouse
Developer ToolsAn open-source tool that audits web pages for performance, accessibility, SEO, and best practices, usable in Chrome DevTools, the CLI, or Node.
What it does
Lighthouse opens a page in a local Chrome instance, collects performance traces and network data, and turns them into reports on performance, accessibility, best practices, and SEO. It is aimed at web developers and performance engineers who need repeatable measurements of a page rather than a single subjective view of how fast it feels.
The tool has several entry points for different levels of control: a Lighthouse panel inside Chrome DevTools, a Chrome extension, a Node CLI for scripted or bulk runs, and a Node module for calling Lighthouse from your own code. All of them can emit HTML, JSON, or CSV reports; JSON reports can be opened and shared in the online Lighthouse Viewer.
Quick start
For a one-off check, install Chrome, open DevTools, select the Lighthouse panel, and click Generate report (DevTools instructions).
For a configurable or automated run, use the Node CLI. It requires Node 22 (LTS) or newer:
npm install -g lighthouse
lighthouse https://example.com/ --view
The command audits the page in Chrome and writes an HTML report; --view opens it in the browser. Use --output json --output-path=./report.json for machine-readable output, or --output html --output-path ./report.html for a specific HTML file (CLI options and examples).
To audit several URLs, pass multiple URLs or a newline-delimited list with --url-file:
lighthouse --url-file=./urls.txt --output-path=./reports
The output directory must already exist (output examples).
Configuration and lifecycle
CLI flags control which categories run (--only-categories=performance,seo), presets such as --preset=desktop, throttling, and Chrome launch flags. --gather-mode (-G) collects browser artifacts to disk, --audit-mode (-A) re-runs audits on saved artifacts, and -GA does both; this lets you repeat or debug audits without touching the browser again (lifecycle examples).
For custom audits, plugins, authenticated pages, or matching a performance budget in CI, the repository links to configuration and recipe documentation, including the plugin example and custom audit recipe. The Node module route is documented in using Lighthouse programmatically.
Usage constraints
- Node 22 (LTS) or newer is required for the Node CLI; runs drive a local Chrome or Chromium (version 66 or later for a specified binary path) (CLI section).
- Scores are environment-dependent. By default, Lighthouse emulates a slow 4G connection and throttles CPU; the official FAQ explains why a page that feels fast locally can still score poorly (throttling notes). Results vary even without code changes, so the docs advise consistent test environments and multiple runs (variability guide).
- Data stays local. The FAQ states that reports are not sent to a remote server; the first CLI run asks about anonymous error reporting, and declining does not affect usage (error reporting).
- The tool measures a URL, not authenticated flows by default. Testing pages behind login needs the separate authentication guidance linked in the docs.
HotRepo's take
Lighthouse is a long-lived, widely used Chrome developer tool with an Apache-2.0 license and a large test suite. A 2026-11-14 daily snapshot on the JavaScript list recorded 31,079 stars with 21 stars gained and a best position of 7 that day. HN discussion from 2021 around Lighthouse v8 focused on the new CLS metric and a CSP-related scoring edge case, where a maintainer acknowledged the issue after a user reported it (HN thread and issue). The main takeaway for readers is that the scoring rules have evolved and can occasionally penalize a page for something in the audit tooling itself, so it pays to check the specific audit and version when a result is surprising.
Written by AI from the project's README, updated . The project's own docs are the source of truth.
Hacker News
You might also like
- ChromeDevTools/chrome-devtools-mcpLets coding agents drive a live Chrome instance to record traces, inspect network traffic and debug web apps.
- angular/angularA TypeScript-based platform and CLI for building mobile and desktop web applications.
- AgriciDaniel/claude-seoA Claude Code skill that audits websites for technical SEO, structured data, and AI-search readiness.
- GoogleChrome/modern-web-guidance-srcInject curated modern web platform guidance into coding agents through a local CLI skill.