Forrest logo
tool overview
On this page you find all important commands for the CLI tool lighthouse. If the command you are looking for is missing please ask our AI.

lighthouse

Lighthouse is an open-source command line tool developed by Google to improve web page performance and quality. It allows developers to audit their web pages against a set of performance, accessibility, progressive web app, best practice, and SEO standards. Lighthouse provides detailed reports on various aspects of a web page's performance, including metrics like first contentful paint, time to interactive, and speed index. It also analyzes accessibility aspects, checking for proper color contrast, keyboard navigation, and other considerations for users with disabilities. By running audits, Lighthouse provides suggestions and recommendations to optimize web pages for better performance, user experience, and visibility on search engines. Developers can customize the audits by selecting specific categories or including additional plugins specific to their needs. Lighthouse also offers capabilities to audit and validate Progressive Web Apps (PWAs), ensuring they meet the required standards for offline use, notifications, and other PWA features. It allows for easy integration into build processes and automation, making it suitable for continuous integration and deployment scenarios. Lighthouse is available as an npm package and can be run from the command line or integrated into other tools and frameworks. Its strong community support, regular updates, and continuous improvements make it a popular choice among developers for web page optimization and compliance testing.

List of commands for lighthouse:

  • lighthouse:help lighthouse: Display help.
    $ lighthouse --help
    try on your machine
    explain this command
  • lighthouse:tldr:12f4b lighthouse: Generate a JSON report and save it to a specific file.
    $ lighthouse --output ${json} --output-path ${filename-json} ${https:--example-com}
    try on your machine
    explain this command
  • lighthouse:tldr:2e636 lighthouse: Generate an HTML report for a specific website and save it to a file in the current directory.
    $ lighthouse ${https:--example-com}
    try on your machine
    explain this command
  • lighthouse:tldr:694f6 lighthouse: Generate a report using the browser in headless mode without logging to `stdout`.
    $ lighthouse --quiet --chrome-flags="${--headless}" ${https:--example-com}
    try on your machine
    explain this command
  • lighthouse:tldr:6c15a lighthouse: Generate a report for specific categories only.
    $ lighthouse --only-categories=${performance,accessibility,best-practices,seo,pwa} ${https:--example-com}
    try on your machine
    explain this command
  • lighthouse:tldr:7a467 lighthouse: Generate a report, using the HTTP header key/value pairs in the specified JSON file for all requests.
    $ lighthouse --extra-headers=${filename-json} ${https:--example-com}
    try on your machine
    explain this command
  • lighthouse:tldr:a32b6 lighthouse: Generate a report with device emulation and all throttling disabled.
    $ lighthouse --screenEmulation.disabled --throttling-method=${provided} --no-emulatedUserAgent ${https:--example-com}
    try on your machine
    explain this command
  • lighthouse:tldr:d9fed lighthouse: Generate a JSON report and print it.
    $ lighthouse --output ${json} ${https:--example-com}
    try on your machine
    explain this command
tool overview