Axe DevTools for Web CLI

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

A command-line tool for automating web accessibility testing without writing test code.

Not for use with personal data

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:

  1. Analyze pages: run one or more URLs through axe and 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
  2. 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>].json

These 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