File path for the report. Use stdout to write to standard output. With multiple outputs, the path is used as a base and the appropriate extension is appended.
--view
boolean
false
Open the HTML report in your browser after the run.
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.
# -G: launch browser, collect artifacts, save to ./latest-run/, then quitlighthouse https://example.com -G# -A: skip browser, load artifacts from ./latest-run/, run audits, generate reportlighthouse https://example.com -A# -GA: normal run, but also save artifacts to disk for later -A runslighthouse https://example.com -GA# Provide a custom artifacts folderlighthouse https://gmail.com -GA=./gmailartifacts
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.
# Run only performance and SEO categorieslighthouse https://example.com --only-categories=performance,seo# Use the desktop presetlighthouse https://example.com --preset=desktop# Run headless Chrome with no logginglighthouse https://example.com --quiet --chrome-flags="--headless"# Disable device emulation and throttling (as measured on your machine)lighthouse https://example.com --screenEmulation.disabled --throttling-method=provided --no-emulatedUserAgent# Pass custom HTTP headerslighthouse https://example.com --extra-headers "{\"Cookie\":\"monster=blue\"}"# Use a custom config filelighthouse https://example.com --config-path=./myconfig.js# Open HTML report in browser after runlighthouse https://example.com --view
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: