a11ywatch-cli
The A11yWatch Command Line Interface. View the cli-docs for more complete info.
Installation
cargo install a11ywatch_cli
Optional:
If you are using Lite mode you can add the feature flag grpc
to compile protoc and tonic.
Protoc is required to compile. 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.
Linux
If you are on Ubuntu OpenSSL is required.
You may need to add the command sudo
before apt-get
.
&& &&
Windows
Cmake is required on windows.
Build
Get the CLI by running one of the commands below.
# install via cargo
# or 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 requires docker running.
# Start the instance with the front-end on port 3270 by default requires docker running..
# You can also start the system local via `nodejs` monolith.
# Use the `--standalone` flag to use the monolith in docker.
# If you need to upgrade the instance to new images run with the upgrade flag - can also be used with the build command.
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 and store results as csv to disk.
# 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.
&&
# crawl and store results as csv to disk.
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"
# set to a directory or true in order to enable recordings in litemode
PAGEMIND_RECORD=
You can also use the CLI to configure settings like Computer Vision creditials, Recording Video, and more.
# replace $mycv_token and $myvcvname with your project name and ComputerVision API url
Example options and commands a11ywatch -h
:
)
Supported Architectures
Mac, linux, and Windows.
Features
grpc
- use gRPC to connect to the litemode instance.
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.