Installing Axe DevTools for Web CLI
Install the CLI as a standalone executable or as a Node.js package.
Axe DevTools CLI is available in two forms. Choose the one that fits your environment:
- Executables: self-contained binaries with no prerequisites
- Node.js package: installed via npm or Yarn, requires Node.js
Requirements
Axe DevTools CLI requires a browser driver for each browser you want to use. The driver must be on your PATH. Keep both your browser and its driver up to date.
| Browser | Driver |
|---|---|
| Chrome | ChromeDriver |
| Firefox | geckodriver |
| Safari | safaridriver is built into macOS. You may need to run safaridriver --enable before using it. |
| Microsoft Edge | Microsoft Edge WebDriver |
| Internet Explorer | IE Driver Server |
Install the Executable
The executables have no prerequisites; Node.js is not required.
You need a Deque Agora account to access the downloads page. If you don't have one, contact your Deque representative, use our support desk, or email us.
Download the appropriate executable for your platform from the CLI section of the downloads page:
axe-linux(Linux)axe-macos(macOS)axe-win.exe(Windows)
Set up on Linux
Make the file executable:
chmod +x axe-linuxSet up on macOS
Make the file executable, then remove the quarantine attribute that macOS adds to downloaded files:
chmod +x axe-macos
xattr -d com.apple.quarantine axe-macosTest your installation
Run the help command from the directory where you placed the executable:
- Linux:
./axe-linux --help - macOS:
./axe-macos --help - Windows:
axe-win --help
Depending on your account configuration, you may need administrator privileges.
Make the CLI available globally
To run axe from any directory, place the executable in a directory on your PATH.
The rest of this documentation assumes you have renamed the executable to axe (or axe.exe on Windows) and that it is available globally.
Install via Node.js
You need Node.js installed. To check, run node -v in your terminal.
You need access to the Deque Systems private registry. If you don't already have access, contact the Deque Systems helpdesk.
Step 1: Get an Agora Identity Token
Agora is Deque's private npm registry that hosts @axe-devtools packages. To access it, you need an identity token.
- Visit your Agora profile page. (If you're redirected after login, click the link a second time or click Edit Profile in the top-right corner.)
- Click Generate an Identity Token.
- Optionally add a description to identify the token later.
- Copy the token to your clipboard. Save it somewhere secure because you won't be able to retrieve it from Agora again.
Remember to copy your Identity Token's value when creating it, as this will be your only opportunity. Otherwise, you'll have to create a new token.
Identity Tokens expire (usually after a year), so you'll need to recreate your token periodically.
Step 2: Configure your .npmrc
- Visit the Configuring Access to Agora packages tool. None of the information you enter is stored or transmitted.
- Enter your Agora email address and identity token.
- Click Generate Configuration and copy the output.
- Paste the copied lines into your
~/.npmrcfile (%USERPROFILE%/.npmrcon Windows).
Your .npmrc should look like this:
@axe-devtools:registry=https://agora.dequecloud.com/artifactory/api/npm/devtools-npm/
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:_auth="<generated-auth-string>"
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:email=<your-email@example.com>
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:always-auth=trueThe _auth value is the base64 encoding of <your-email>:<your-identity-token>.
Step 3: Install the package
Install globally with npm:
npm install -g @axe-devtools/cliOr with Yarn:
yarn global add @axe-devtools/cliTest your installation
axe --helpIf the help text appears, the CLI is installed and ready to use.
