CLI Reference
Command syntax and complete option reference for all Axe DevTools CLI subcommands
A quick reference for every Axe DevTools CLI subcommand and its options. For usage guidance and examples, follow the link to each command's article.
axe <url>— analyze pages by URLaxe bulk-reports— send results to Axe Reportsaxe bulk-spec— run a directory of spec filesaxe config-selenium— configure persistent browser defaultsaxe devhub— send results to Axe Developer Hubaxe licenses— display dependency licensesaxe reporter— generate reports from JSON resultsaxe ruleset— generate custom rulesetsaxe spec— run a spec file
axe <url>
Analyzes one or more web pages for accessibility issues. See Testing Pages for full documentation.
axe <url...> [options]Some options are saved to a preferences file and persist across CLI runs. See Configuration for details.
| Option | Description |
|---|---|
-a, --axe-source <path> |
Path to an alternative axe.js file. |
--accept-untrusted |
Accept untrusted SSL certificates. Persists. |
--axe-devhub-api-key <api-key> |
API key for Axe Developer Hub. |
--axe-devhub-project-id <project-id> |
Project ID for Axe Developer Hub. |
--axe-devhub-server-url <url> |
URL of the Axe Developer Hub server. Default: https://axe.deque.com. |
--axe-reports-api-key <api-key> |
API key for Axe Reports. |
--axe-reports-dimensions <dimensions> |
Comma-separated JTBD dimensions to tag this scan in Axe Reports. |
--axe-reports-url <url> |
URL to send results to Axe Reports. |
--browser [name] |
Browser to use. Requires the corresponding WebDriver. Valid values: firefox (default), chrome, edge (or microsoftedge), safari, ie. Browser-specific options apply only to Firefox, Chrome, and Edge. Persists. |
--chrome-options [options] |
Comma-separated browser command-line switches for Chrome or Edge. Persists. |
--chrome-path <path> |
Absolute path to the Chrome or Edge browser executable. |
--chromedriver-path <path> |
Absolute path to the ChromeDriver or msedgedriver executable. |
-c, --custom <path> |
Path to a custom ruleset file, overriding the default. |
-d, --dir <path> |
Directory where JSON results are saved. |
-l, --disable <list> |
Comma-separated rule IDs to disable. |
-e, --exclude <list> |
Comma-separated CSS selectors for elements to exclude from testing. |
-q, --exit |
Exit with code 1 if violations are found. |
--enable-tracking <state> |
Enable (true) or disable (false) sending usage data to the metrics library. Persists. |
-f, --format <value> |
Report format(s): html, junit, csv, universal, or a +-separated combination. Default: html. Requires -r, --report. |
--filter <list> |
Comma-separated result types to include: passes, violations, incomplete, inapplicable. Requires --format csv. |
--universal-best-practices |
Record bestPracticesEnabled=true in the metadata when using --format universal. |
--universal-ruleset <id> |
Ruleset ID to record in the metadata when using --format universal. Valid values: wcag2, wcag2.1, wcag2.2, wcag2aaa, wcag2.1aaa, wcag2.2aaa, 508, en301549, ttv5, rgaav4. Default: wcag2.1. |
--headless |
Launch the browser in headless mode. Persists. |
-i, --include <list> |
Comma-separated CSS selectors. Only matching elements are tested. |
--load-delay <n> |
Milliseconds to wait after page load before running the audit. Default: 0. |
--no-git-data |
Do not send Git branch and commit data to Axe Developer Hub. |
--no-reporter |
Suppress the violation summary output. |
--page-timeout <ms> |
Maximum milliseconds to wait for a page to load. Default: 60000. Persists. |
--post-analyze-pause <ms> |
Milliseconds to pause after analysis before the next action. Default: 2000. Persists. |
--post-get-pause <ms> |
Milliseconds to pause after page load and before scanning. Default: 2000. Persists. |
--post-script-pause <ms> |
Milliseconds to pause after a script action and before scanning. Default: 2000. Persists. |
-r, --report <output-dir> |
Directory where the formatted report is written. Use with -f, --format. |
--remote-proxy [proxy-server] |
Route traffic through a remote proxy (Chromium-based browsers only: Chrome and Edge). Persists. |
--remote-server [server-url] |
Connect to a remote WebDriver server (e.g. Selenium Grid, BrowserStack). Persists. |
--rules <list> |
Comma-separated rule IDs to run. Only the specified rules are checked. |
-s, --save [filename] |
Save results as a JSON file. Filename defaults to axe-result.json. |
--script-timeout <ms> |
Maximum milliseconds to wait for a workflow script. Default: 60000. Persists. |
--send-axe-reports |
Send analysis results to Axe Reports. |
--set-distinct-id <id> |
Override the distinct ID used for usage tracking. Persists. |
--set-tracking-url <url> |
Override the URL where metrics data are sent. Persists. |
--show-errors |
Display the full error stack trace on errors. |
-j, --stdout |
Output JSON results to stdout; silences all other output. |
-t, --tags <list> |
Comma-separated tags to filter which rules are run. |
--timer |
Print timing measurements after each test run. |
-v, --verbose |
Include tool name, version, and environment metadata in output. |
-V, --version |
Output the version number. |
--window-size <width,height> |
Set the browser window size in pixels. Persists. |
axe bulk-reports
Sends JSON results to Axe Reports. See Send to Axe Reports for full documentation.
axe bulk-reports <results-directory> [options]| Option | Description |
|---|---|
--axe-reports-api-key <api-key> |
API key for Axe Reports. |
--axe-reports-dimensions <dimensions> |
Comma-separated JTBD dimensions to tag this scan in Axe Reports. |
--axe-reports-url <url> |
URL to send results to Axe Reports. |
--send-axe-reports |
Send analysis results to Axe Reports. |
--verbose |
Enable verbose logging. |
axe bulk-spec
Processes a directory of spec files in a single run. See Workflow Specs for full documentation.
axe bulk-spec <spec-files-directory> [output-directory] [options]| Option | Description |
|---|---|
-a, --axe-source <path> |
Path to an alternative axe.js file. |
--accept-untrusted |
Accept untrusted SSL certificates. Persists. |
--browser [name] |
Browser to use. Requires the corresponding WebDriver. Valid values: firefox (default), chrome, edge (or microsoftedge), safari, ie. Browser-specific options apply only to Firefox, Chrome, and Edge. Persists. |
-c, --custom <path> |
Path to a custom ruleset file, overriding the default. |
--dismiss-alerts |
Dismiss browser alert(), confirm(), and prompt() dialogs before scanning. |
--enable-tracking <state> |
Enable (true) or disable (false) sending usage data to the metrics library. Persists. |
-f, --format [value] |
Report format(s): html, junit, csv, or a +-separated combination. Default: html. |
--headless |
Launch the browser in headless mode. Persists. |
--no-analyze |
Remove the requirement for an analyze action in each page's action list. |
--no-html |
Prevent HTML report generation. |
--no-reports |
Prevent all report file generation. |
--no-wait |
Disable automatic pauses between workflow actions. |
--page-timeout <ms> |
Maximum milliseconds to wait for a page to load. Default: 60000. Persists. |
--post-analyze-pause <ms> |
Milliseconds to pause after analysis before the next action. Default: 2000. Persists. |
--post-get-pause <ms> |
Milliseconds to pause after page load and before scanning. Default: 2000. Persists. |
--post-script-pause <ms> |
Milliseconds to pause after a script action and before scanning. Default: 2000. Persists. |
--remote-proxy [proxy-server] |
Route traffic through a remote proxy (Chromium-based browsers only: Chrome and Edge). Persists. |
--remote-server [server-url] |
Connect to a remote WebDriver server (e.g. Selenium Grid, BrowserStack). Persists. |
--script-timeout <ms> |
Maximum milliseconds to wait for a workflow script. Default: 60000. Persists. |
--set-distinct-id <id> |
Override the distinct ID used for usage tracking. Persists. |
--set-tracking-url <url> |
Override the URL where metrics data are sent. Persists. |
-t, --tags [list] |
Comma-separated tags to filter which rules are run. |
--user-agent <agent> |
Set a custom user agent string (Chromium-based browsers only: Chrome and Edge). Persists. |
--validate |
Validate the spec files without running them. |
--wait-network-idle-new-connections [number] |
New connection threshold before the network is considered idle (Chromium-based browsers only: Chrome and Edge). |
--wait-network-idle-open-connections [number] |
Open connection threshold before the network is considered idle (Chromium-based browsers only: Chrome and Edge). |
--wait-network-idle-timeout [ms] |
Maximum milliseconds to wait for network idle before proceeding (Chromium-based browsers only: Chrome and Edge). |
--window-size <width,height> |
Set the browser window size in pixels. Persists. |
axe config-selenium
Interactively configures persistent browser and timing defaults. See Configuration for full documentation.
axe config-selenium [options]| Option | Description |
|---|---|
-s, --show |
Display current saved settings without entering the interactive prompt. |
axe devhub
Sends JSON results to Axe Developer Hub. See Send to Axe Developer Hub for full documentation.
axe devhub <results-directory|file> [options]| Option | Description |
|---|---|
--axe-devhub-api-key <api-key> |
API key for Axe Developer Hub. Overrides the AXE_DEVHUB_API_KEY environment variable. |
--axe-devhub-project-id <project-id> |
Project ID for Axe Developer Hub. |
--axe-devhub-server-url <url> |
URL of the Axe Developer Hub server. Default: https://axe.deque.com. |
--no-git-data |
Do not send Git branch and commit data to Axe Developer Hub. |
axe licenses
Displays and saves the open-source licenses for all CLI dependencies.
axe licenses [options]axe reporter
Converts JSON results into HTML, JUnit XML, or CSV reports. See Generate Reports for full documentation.
axe reporter <results-dir> [dest-dir] [options]| Option | Description |
|---|---|
-b, --browser [name] |
When the results directory contains results from multiple browsers, generate the report from only one browser's results. |
-d, --dest [path] |
Output directory for generated reports. Can also be specified as the second positional argument. |
--filter <list> |
Comma-separated result types to include: passes, violations, incomplete, inapplicable. Requires --format csv. |
-f, --format [type(s)] |
Output format(s): html, junit, csv, universal, or a combination. Default: html. |
--universal-best-practices |
Record bestPracticesEnabled=true in the metadata when using --format universal. |
--universal-ruleset <id> |
Ruleset ID to record in the metadata when using --format universal. Valid values: wcag2, wcag2.1, wcag2.2, wcag2aaa, wcag2.1aaa, wcag2.2aaa, 508, en301549, ttv5, rgaav4. Default: wcag2.1. |
axe ruleset
Generates custom ruleset files. See Custom Rulesets for full documentation.
axe ruleset [options]| Option | Description |
|---|---|
--508 [filename] |
Generate a standard config for Section 508 rules. |
--all [filename] |
Generate a standard config for all supported guidelines. |
-a, --axe-source <path> |
Path to a custom axe source. |
-c, --custom [dir] |
Generate a custom ruleset from a directory containing a changes.json file. |
-d, --destination [dir] |
Output directory. Default: current working directory. |
-x, --disable-other-rules |
Disable all rules not included in the rules property. Default: true. |
--en301549 [filename] |
Generate a standard config for EN 301 549 rules. |
-f, --format [format] |
Output format. |
-l, --log |
Also generate a list of all rules included in the generated ruleset. |
--only-changes |
Generate only the changes and additions to the ruleset. |
--rgaav4 [filename] |
Generate a standard config for RGAA v4 rules. |
-t, --tags [list] |
Comma-separated tags to filter the standard ruleset. |
--ttv5 [filename] |
Generate a standard config for Trusted Tester v5 rules. |
--wcag2 [filename] |
Generate a standard config for WCAG 2.0 AA rules. |
--wcag21 [filename] |
Generate a standard config for WCAG 2.1 AA rules. |
--wcag21aaa [filename] |
Generate a standard config for WCAG 2.1 AAA rules. |
--wcag22 [filename] |
Generate a standard config for WCAG 2.2 AA rules. |
--wcag22aaa [filename] |
Generate a standard config for WCAG 2.2 AAA rules. |
--wcag2aaa [filename] |
Generate a standard config for WCAG 2.0 AAA rules. |
axe spec
Analyzes pages defined in a JSON or YAML spec file. See Workflow Specs for full documentation.
axe spec <spec-file> [output-directory] [options]| Option | Description |
|---|---|
-a, --axe-source <path> |
Path to an alternative axe.js file. |
--accept-untrusted |
Accept untrusted SSL certificates. Persists. |
--axe-devhub-api-key <api-key> |
API key for Axe Developer Hub. |
--axe-devhub-project-id <project-id> |
Project ID for Axe Developer Hub. |
--axe-devhub-server-url <url> |
URL of the Axe Developer Hub server. Default: https://axe.deque.com. |
--axe-reports-api-key <api-key> |
API key for Axe Reports. |
--axe-reports-dimensions <dimensions> |
Comma-separated JTBD dimensions to tag this scan in Axe Reports. |
--axe-reports-url <url> |
URL to send results to Axe Reports. |
--browser [name] |
Browser to use. Requires the corresponding WebDriver. Valid values: firefox (default), chrome, edge (or microsoftedge), safari, ie. Browser-specific options apply only to Firefox, Chrome, and Edge. Persists. |
--chrome-options [options] |
Comma-separated browser command-line switches for Chrome or Edge. Persists. |
-c, --custom <path> |
Path to a custom ruleset file, overriding the default. |
--descendant-links |
Collect links on each page and append them to results. Requires --verbose. |
--dismiss-alerts |
Dismiss browser alert(), confirm(), and prompt() dialogs before scanning. |
--download-path <path> |
Set where the browser saves downloads (Chromium-based browsers only: Chrome and Edge). |
--enable-tracking <state> |
Enable (true) or disable (false) sending usage data to the metrics library. Persists. |
-f, --format [value] |
Report format(s): html, junit, csv, universal, or a +-separated combination. Default: html. |
--filter <list> |
Comma-separated result types to include: passes, violations, incomplete, inapplicable. Requires --format csv. |
--headless |
Launch the browser in headless mode. Persists. |
--interactive-mode |
Start running actions as soon as the page's HTML has loaded, without waiting for images, stylesheets, and other resources to finish. Use this for pages that you need to interact with before scanning, or that take a long time to finish loading. |
--no-analyze |
Remove the requirement for an analyze action in each page's action list. |
--no-exit |
Force exit code 0 even when violations are found. |
--no-git-data |
Do not send Git branch and commit data to Axe Developer Hub. |
--no-html |
Prevent HTML report generation. |
--no-reports |
Prevent all report file generation. |
--no-wait |
Disable automatic pauses between workflow actions. |
--page-name <name> |
Run only the page with the specified name from the spec file. |
--page-source |
Append the scanned HTML source to results. Requires --verbose. |
--page-timeout <ms> |
Maximum milliseconds to wait for a page to load. Default: 60000. Persists. |
--page-title |
Append the page title to results. Requires --verbose. |
--post-analyze-pause <ms> |
Milliseconds to pause after analysis before the next action. Default: 2000. Persists. |
--post-get-pause <ms> |
Milliseconds to pause after page load and before scanning. Default: 2000. Persists. |
--post-script-pause <ms> |
Milliseconds to pause after a script action and before scanning. Default: 2000. Persists. |
--remote-proxy [proxy-server] |
Route traffic through a remote proxy (Chromium-based browsers only: Chrome and Edge). Persists. |
--remote-server [server-url] |
Connect to a remote WebDriver server (e.g. Selenium Grid, BrowserStack). Persists. |
--resume-from <name> |
Skip all pages before the named page in the spec file. |
--scanned-url |
Add the base URL and scan URL to verbose results. Chrome only. Requires --verbose. |
--script-timeout <ms> |
Maximum milliseconds to wait for a workflow script. Default: 60000. Persists. |
--send-axe-reports |
Send analysis results to Axe Reports. |
--set-distinct-id <id> |
Override the distinct ID used for usage tracking. Persists. |
--set-legacy-mode |
Enable legacy scan mode. Deprecated — will be removed in v5.0. |
--set-tracking-url <url> |
Override the URL where metrics data are sent. Persists. |
--silent-mode |
Suppress all decorative output; results are shown only when --verbose is also active. |
-t, --tags [list] |
Comma-separated tags to filter which rules are run. |
--universal-best-practices |
Record bestPracticesEnabled=true in the metadata when using --format universal. |
--universal-ruleset <id> |
Ruleset ID to record in the metadata when using --format universal. Valid values: wcag2, wcag2.1, wcag2.2, wcag2aaa, wcag2.1aaa, wcag2.2aaa, 508, en301549, ttv5, rgaav4. Default: wcag2.1. |
--user-agent <agent> |
Set a custom user agent string (Chromium-based browsers only: Chrome and Edge). Persists. |
--validate |
Validate the spec file without running it. |
-v, --verbose |
Include tool name, version, and environment metadata in output. |
--wait-network-idle-new-connections [number] |
New connection threshold before the network is considered idle (Chromium-based browsers only: Chrome and Edge). |
--wait-network-idle-open-connections [number] |
Open connection threshold before the network is considered idle (Chromium-based browsers only: Chrome and Edge). |
--wait-network-idle-polling-every [ms] |
Polling interval in milliseconds for network-idle detection (Chromium-based browsers only: Chrome and Edge). |
--wait-network-idle-timeout [ms] |
Maximum milliseconds to wait for network idle before proceeding (Chromium-based browsers only: Chrome and Edge). |
--window-size <width,height> |
Set the browser window size in pixels. Persists. |
