The Lighthouse CLI gives you the most flexibility for configuring runs, automating audits, and integrating Lighthouse into CI pipelines.
Installation
Lighthouse requires Node 22 (LTS) or later.
Run your first audit:
By default, Lighthouse writes an HTML report to a file in the current directory named after the URL and date.
Common flags
Output flags
Control where and how Lighthouse writes its results.
Configuration flags
Control which audits run and how the browser behaves.
Throttling flags
Chrome flags
Gather mode and audit mode
Lighthouse’s run can be split into two separate phases: gather and audit. This is useful for auditing the same artifacts multiple times, or for separating the browser interaction step from analysis.
Use -GA during development to iterate on audits without re-running the browser each time. Save artifacts once with -GA, then re-audit them with -A as you tweak configuration.
More examples
Error reporting
The first time you run the CLI, Lighthouse asks whether it can anonymously report runtime exceptions. The Lighthouse team uses this data to detect regressions. Opting out has no effect on functionality.
You can force the preference at the command line: