npx lighthouse https://example.com --preset=desktop --output=html --output-path=report.html

Category: Web App Development

npx lighthouse https://example.com --preset=desktop --output=html --output-path=report.html

Audit with the desktop preset and save HTML

Runs the audit using desktop emulation settings instead of the mobile defaults, matching how Lighthouse scores desktop sites. The --preset flag accepts perf, experimental and desktop. The HTML report opens in any browser for sharing.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.