Axe DevTools for Web CLI
A command-line tool for automating web accessibility testing without writing test code.
Axe DevTools for Web CLI is a command-line tool that runs accessibility analyses on web pages and generates reports. It's designed for teams that want to automate accessibility testing without integrating axe into an existing test framework, for example, as a step in a CI/CD pipeline, or when Axe DevTools APIs aren't available for your language.
How It Works
Every axe analysis produces JSON result files, one per analyzed page state. These files are produced when testing, and you consume them when reporting or uploading results.
The typical workflow has two phases:
-
Analyze pages: run one or more URLs through
axeand save JSON results:axe <url> → test a URL directly axe spec <spec-file> → test pages and workflows defined in a YAML/JSON file axe bulk-spec <dir> → test using all spec files in a directory -
Do something with results: convert, upload, or send them elsewhere:
axe reporter <results> → generate HTML, JUnit XML, or CSV reports axe bulk-reports <results> → upload to the Axe Reports service axe devhub <results> → send to Axe Developer Hub
The axe and axe spec commands also support --format and --report flags to generate reports in one step, without a separate axe reporter invocation.
Commands
| Command | Purpose |
|---|---|
axe <url...> |
Analyze one or more URLs directly. Default browser: Firefox. Default ruleset: WCAG 2.1 AA. |
axe spec <spec-file> |
Analyze pages defined in a YAML or JSON spec file, including multi-step workflows. |
axe bulk-spec <dir> |
Run all spec files found in a directory and its subdirectories. |
axe reporter <results-dir> |
Convert JSON results to HTML, JUnit XML, or CSV reports. |
axe bulk-reports <results-dir> |
Upload JSON results to the Axe Reports service. |
axe devhub <results-dir> |
Send JSON results to Axe Developer Hub. |
axe ruleset |
List, validate, or manage custom rulesets. |
axe config-selenium |
View or update default browser/Selenium settings. |
JSON Results
When you run axe spec or use axe <url> --save, results are written as JSON files to the output directory. Each file captures the full axe analysis for a single page state: violations, passes, incomplete checks, and inapplicable rules, along with metadata such as the URL, browser, and timestamp.
Result files are organized by project and named after the page being tested:
<output-dir>/<project-id>/<project-id>-<page-id>[-<analyze-title>].jsonThese files are consumed by axe reporter, axe bulk-reports, and axe devhub. For details on file naming and directory structure, see Generate Reports.
The JSON result schema is defined by axe-core. For a full reference, see the axe-core API documentation.
In This Section
- Get Started: common tasks with working examples
- Install: install options (executable or Node.js package)
- Analyze Pages: all options for
axe <url> - Analyze Pages Using a Spec File: spec file structure, actions, and batch processing
- Generate Reports: report formats, filtering, and JSON result structure
- Send to Axe Reports: upload results to the Axe Reports service
- Send to Axe Developer Hub: integrate results with Axe Developer Hub
- Configure: browser selection, timeouts, and persistent settings
- Custom Rulesets: WCAG 2.x, Section 508, and custom rulesets
