Skip to main content

Command Line Options

View Repo

The A11yWatch CLI is an easy way to get started with running, deploying, and testing web accessibility.

Pre-requisites

  • Rust is required.
  • Docker is required if you are not building locally.
  • Nodejs is required for local installs.

Ubuntu

If you are on Ubuntu OpenSSL is required:

apt-get update && apt upgrade -y && apt-get install -y --no-install-recommends build-essential gcc cmake libc6 libssl-dev pkg-config

Getting Started

You can get the CLI using cargo or npm.

  1. cargo install a11ywatch_cli or
  2. npm i a11ywatch-cli -g

CLI Commands

You can run the a11ywatch -h command to get all the options and details for the CLI.

a11ywatch_cli 0.8.23
j-mendez <jeff@a11ywatch.com>
A11yWatch web accessibility CLI.

USAGE:
a11ywatch [OPTIONS] [SUBCOMMAND]

OPTIONS:
-f, --find-results
Log file results path

--find-tmp-dir
Get the apps tmp directory location

-g, --github-api-url
Get github API endpoint of project

--github-results-path
Log file results github path

-h, --help
Print help information

-r, --results-parsed
Get results file parsed to json

-r, --results-parsed-list
Get results file parsed as report list of passed / failed

--results-issues
Get the total amount of issues between errors,warning,notice that occurred for the
result set

--results-issues-errors
Get the total amount of issues of type error from result set

--results-issues-warnings
Get the total amount of issues of type warning from result set

--results-parsed-github
Get results of the github html message

-s, --set-token <SET_TOKEN>
Set the API token to use for request

--set-cv-token <SET_CV_TOKEN>
Set the Computer Vision API token to use for request

--set-cv-url <SET_CV_URL>
Set the Computer Vision API endpoint to use for request

-V, --version
Print version information

SUBCOMMANDS:
build Build the project on the local machine [defaults to docker runtime]
crawl Site wide scan a website url for issues
extract Extract results in formats for platforms
help Print this message or the help of the given subcommand(s)
scan Single page scan a website url for issues
start Start the application on the local machine [defaults to docker runtime]
stop Stop the project on the local machine [defaults to docker runtime]

Quick Start

To get started scanning your website with the CLI run the following commands.

# pass -f option to start with the front-end
a11ywatch start
# single page scan and store results
a11ywatch scan --url https://a11ywatch.com -s
# full multi site crawl
a11ywatch crawl --url https://a11ywatch.com -s -d
# full site wide crawl with subdomains and TLDS
a11ywatch crawl --url https://a11ywatch.com -s -d --subdomains --tld

If you want to display detailed reports on the last scan run a11ywatch --results-parsed-list, the prior run also needs the -s flag to store results. This will bring up the last scan with pass/fail reports for each page.

Use the -d flag in order to enable real time log output of pages completed.

Code Fix

The command line gives you the ability to get code fixes right into your project after a scan using the --fix flag.

Run the following:

a11ywatch crawl --url https://a11ywatch.com -s -d --fix