You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CHROME_PATH: Explicit path of intended Chrome binary. If set must point to an executable of a build of
93
-
Chromium version 66.0 or later. By default, any detected Chrome Canary or Chrome (stable) will be launched.
94
-
[default: ""]
95
-
--port The port to use for the debugging protocol. Use 0 for a random port [default: 0]
96
-
--preset Use a built-in configuration. [choices: "experimental", "perf"]
97
-
WARNING: If the --config-path flag is provided, this preset will be ignored.
98
-
--hostname The hostname to use for the debugging protocol. [default: "localhost"]
99
-
--max-wait-for-load The timeout (in milliseconds) to wait before the page is considered done loading and the run should continue.
100
-
WARNING: Very high values can lead to large traces and instability [default: 45000]
101
-
--emulated-form-factor Controls the emulated device form factor (mobile vs. desktop) if not disabled [choices: "mobile", "desktop", "none"] [default: "mobile"]
102
-
--enable-error-reporting Enables error reporting, overriding any saved preference. --no-enable-error-reporting will do the opposite. More:
103
-
https://git.io/vFFTO
104
-
--gather-mode, -G Collect artifacts from a connected browser and save to disk. If audit-mode is not also enabled, the run will quit
105
-
early. [boolean]
106
-
--audit-mode, -A Process saved artifacts from disk [boolean]
86
+
An example config file: lighthouse-core/config/lr-desktop-config.js [string]
87
+
--preset Use a built-in configuration.
88
+
WARNING: If the --config-path flag is provided, this preset will be ignored. [string] [choices: "perf", "experimental"]
89
+
--chrome-flags Custom flags to pass to Chrome (space-delimited). For a full list of flags, see https://bit.ly/chrome-flags
90
+
Additionally, use the CHROME_PATH environment variable to use a specific Chrome binary. Requires Chromium version 66.0 or later. If omitted, any detected Chrome Canary or Chrome stable will be used. [string] [default: ""]
91
+
--port The port to use for the debugging protocol. Use 0 for a random port [number] [default: 0]
92
+
--hostname The hostname to use for the debugging protocol. [string] [default: "localhost"]
93
+
--emulated-form-factor Controls the emulated device form factor (mobile vs. desktop) if not disabled [string] [choices: "mobile", "desktop", "none"]
94
+
--max-wait-for-load The timeout (in milliseconds) to wait before the page is considered done loading and the run should continue. WARNING: Very high values can lead to large traces and instability [number]
95
+
--enable-error-reporting Enables error reporting, overriding any saved preference. --no-enable-error-reporting will do the opposite. More: https://git.io/vFFTO [boolean]
96
+
--gather-mode, -G Collect artifacts from a connected browser and save to disk. (Artifacts folder path may optionally be provided). If audit-mode is not also enabled, the run will quit early.
97
+
--audit-mode, -A Process saved artifacts from disk. (Artifacts folder path may be provided, otherwise defaults to ./latest-run/)
98
+
--only-audits Only run the specified audits [array]
99
+
--only-categories Only run the specified categories. Available categories: accessibility, best-practices, performance, pwa, seo [array]
100
+
--skip-audits Run everything except these audits [array]
101
+
--budget-path The path to the budget.json file for LightWallet. [string]
107
102
108
103
Output:
109
-
--output Reporter for the results, supports multiple values [choices: "json", "html", "csv"] [default: "html"]
104
+
--output Reporter for the results, supports multiple values. choices: "json", "html", "csv" [array] [default: ["html"]]
110
105
--output-path The file path to output the results. Use 'stdout' to write to stdout.
111
-
If using JSON output, default is stdout.
112
-
If using HTML or CSV output, default is a file in the working directory with a name based on the test URL and date.
113
-
If using multiple outputs, --output-path is appended with the standard extension for each output type. "reports/my-run" -> "reports/my-run.report.html", "reports/my-run.report.json", etc.
114
-
Example: --output-path=./lighthouse-results.html
115
-
--view Open HTML report in your browser [boolean]
106
+
If using JSON output, default is stdout.
107
+
If using HTML or CSV output, default is a file in the working directory with a name based on the test URL and date.
108
+
If using multiple outputs, --output-path is appended with the standard extension for each output type. "reports/my-run" -> "reports/my-run.report.html", "reports/my-run.report.json", etc.
--cli-flags-path The path to a JSON file that contains the desired CLI flags to apply. Flags specified at the command line will still override the file-based ones.
116
+
--locale The locale/language the report should be formatted in
117
+
--blocked-url-patterns Block any network requests to the specified URL patterns [array]
118
+
--disable-storage-reset Disable clearing the browser cache and other storage APIs before a run [boolean]
--throttling.cpuSlowdownMultiplier Controls simulated + emulated CPU throttling
131
-
--extra-headers Set extra HTTP Headers to pass with request [string]
127
+
--extra-headers Set extra HTTP Headers to pass with request
128
+
--precomputed-lantern-data-path Path to the file where lantern simulation data should be read from, overwriting the lantern observed estimates for RTT and server latency. [string]
129
+
--lantern-data-output-path Path to the file where lantern simulation data should be written to, can be used in a future run with the `precomputed-lantern-data-path` flag. [string]
lighthouse <url> --view Opens the HTML report in a browser after the run completes
135
-
lighthouse <url> --config-path=./myconfig.js Runs Lighthouse with your own configuration: custom audits, report
136
-
generation, etc.
137
-
lighthouse <url> --output=json --output-path=./report.json --save-assets Save trace, devtoolslog, and named JSON report.
138
-
lighthouse <url> --emulated-form-factor=none Disable device emulation and all throttling.
139
-
--throttling-method=provided
140
-
lighthouse <url> --chrome-flags="--window-size=412,660" Launch Chrome with a specific window size
141
-
lighthouse <url> --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging
142
-
lighthouse <url> --extra-headers "{\"Cookie\":\"monster=blue\"}" Stringify\'d JSON HTTP Header key/value pairs to send in requests
143
-
lighthouse <url> --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests
144
-
lighthouse <url> --only-categories=performance,pwa Only run the specified categories. Available categories: accessibility,
145
-
best-practices, performance, pwa, seo.
135
+
lighthouse <url> --view Opens the HTML report in a browser after the run completes
136
+
lighthouse <url> --config-path=./myconfig.js Runs Lighthouse with your own configuration: custom audits, report generation, etc.
137
+
lighthouse <url> --output=json --output-path=./report.json --save-assets Save trace, screenshots, and named JSON report.
138
+
lighthouse <url> --emulated-form-factor=none --throttling-method=provided Disable device emulation and all throttling
139
+
lighthouse <url> --chrome-flags="--window-size=412,660" Launch Chrome with a specific window size
140
+
lighthouse <url> --quiet --chrome-flags="--headless" Launch Headless Chrome, turn off logging
141
+
lighthouse <url> --extra-headers "{\"Cookie\":\"monster=blue\", \"x-men\":\"wolverine\"}" Stringify'd JSON HTTP Header key/value pairs to send in requests
142
+
lighthouse <url> --extra-headers=./path/to/file.json Path to JSON file of HTTP Header key/value pairs to send in requests
143
+
lighthouse <url> --only-categories=performance,pwa Only run the specified categories. Available categories: accessibility, best-practices, performance, pwa, seo
146
144
147
145
For more information on Lighthouse, see https://developers.google.com/web/tools/lighthouse/.
0 commit comments