a11ywatch-cli
The A11yWatch Command Line Interface. View the cli-docs for more complete info.
If you are on Ubuntu OpenSSL is required.
You may need to add the command sudo
before apt-get
.
&& &&
Vendoring OpenSSL is available by using the feature flag dist-vendor
upon install ex: cargo install --path . --features dist-vendor
. The flag is also available following RTN Consuming for node installs via npm.
Build
Get the CLI by running one of the commands below.
# install via cargo
# install via npm
Build init:
# build the instance first, this allows configuring architecture specifics like apple m1 chips.
Startup:
Use one of the following commands to 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].
# start the instance.
# 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 by default.
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
.
In order to stop services make sure to pass in the proper flags that were used to build/start the instances.