a11ywatch-cli
The A11yWatch Command Line Interface. View the cli-docs for more complete info.
Build
Get the CLI by running one of the commands below.
# install via cargo
# install via npm
Startup:
# build the instance first, this allows configuring architecture specifics like apple m1 chips.
# start the instance. If you need the front-end client passing the -f option [min of 1.25gb of memory required alloc to docker resource].
# if you need to upgrade the instance to new images run with the upgrade flag.
# start the instance with the front-end on port 3270.
Actions:
# scan a url and pipe the stdout to a file.
# scan a url and attempt to fix code based on recommendations [installs the fast ripgrep crate for search].
# scan a website multi page and pipe the stdout to a file.
# scan a website multi page and include subdomains.
# scan a website multi page and include subdomains and all TLD extensions.
# scan a website multi page and get results parsed as checklist
&&
If you experience issues the cargo install a11ywatch_cli
command, try running rustup update stable
to make sure your cargo version is up to date.
ENV
Here are env vars that you can configure to enhance the system abilities. You can get your Computer Vision API key here. Grab your PageSpeed API key to speed up lighthouse parallel runs.
Example of a .env
file below:
COMPUTER_VISION_SUBSCRIPTION_KEY="REPLACE_WITH_KEY"
COMPUTER_VISION_ENDPOINT="REPLACE_WITH_ENDPOINT"
PAGESPEED_API_KEY="REPLACE_WITH_PAGESPEED_API_KEY"
You can also use the CLI to configure your Computer Vision creditials.
# replace $mycv_token and $myvcvname with your project name and CV API url
Example options and commands a11ywatch -h
:
)
Supported Architectures
Mac, linux, and Windows.
Help
If you are trying to run a website that is running localhost
inside a docker container you need to use your computers hostname instead.
In terminal run the command hostname
and then you can use it ex: a11ywatch crawl --url $(hostname):3000
BETA
The following commands are currently in BETA and require you to have the repo locally tf-provider and set to your directory.
- deploy (TERRAFORM)
- destroy (TERRAFORM)
The scan sub command with the runner option and the remote deployment commands are a work in progress. You may experience issues with the sub commands, feel free to leave an issue when found. In general the CLI is in BETA and may contain breaking changes until v1.