Skip to main content
The Lighthouse CLI gives you full control over audit configuration and output. Use it for one-off audits, automated scripts, or CI pipelines.
Lighthouse requires Node.js 22 (LTS) or later. Run node --version to check.
1

Install Lighthouse

Install the lighthouse package globally using npm or Yarn.
Verify the installation:
2

Run your first audit

Point Lighthouse at any URL. Chrome launches automatically, loads the page, collects data, and exits.
By default, Lighthouse audits all four categories (Performance, Accessibility, SEO, Best Practices) using simulated mobile throttling.
Add --view to automatically open the HTML report in your browser as soon as the audit finishes.
3

View the HTML report

Unless you specify otherwise, Lighthouse saves an HTML report to a file in the current directory:
Open this file in any browser to see your scores, metric values, and actionable recommendations for every failing audit.You can also upload any .report.json file to the Lighthouse Viewer to view and share reports online.
4

Try JSON output

Use the --output flag to change the report format. Lighthouse supports html, json, and csv.
JSON output goes to stdout by default. Redirect it to a file with --output-path:
You can request multiple formats in a single run:
Other output examples:

Common flags

Use --only-categories=performance to skip Accessibility, SEO, and Best Practices audits. This significantly reduces run time when you only need performance metrics.
Run lighthouse --help to see all available options.