Skip to main content
AccessibilityBrief

Command line tool (CLI)

Check a website for accessibility issues from your terminal or CI with npx accessibilitybrief: WCAG 2.2 scans, build gates on severity or score, JSON output and a GitHub Action. Pro and Agency plans.

The accessibilitybrief command line tool starts an accessibility scan of a site in your workspace, waits for the result and prints it. In a CI pipeline it can fail the build when serious issues appear or the score drops, so accessibility regressions are caught before they reach production.

Scans run on AccessibilityBrief's servers, the same as scans started in the app: WCAG 2.2 A and AA, at desktop and phone size. Nothing is installed on your site. The full report, with the exact fix for each issue, is in your account.

Requirements

  • Node.js 18.17 or newer.
  • A Pro or Agency plan.
  • An API key with the read and scan scopes from Settings → API and integrations.
  • The site must already be added to your workspace. Each scan uses one manual scan of your plan.

Run a scan

No installation is needed: npx downloads the accessibilitybrief package from npm and runs it.

export ACCESSIBILITYBRIEF_API_KEY=ab_live_…
npx accessibilitybrief scan https://example.com --fail-on serious
Scanning example.com …
Score 97 out of 100 (automated). 1 page scanned.
Critical 0, serious 0, moderate 1, minor 0

Issues, worst first:
  moderate Links with vague text (1 element, 1 page)

To install it once instead: npm install -g accessibilitybrief, then run accessibilitybrief scan ….

Commands

CommandWhat it does
accessibilitybrief scan <url or site id>Start a scan, wait for it and print the result.
accessibilitybrief sitesList the sites in your workspace.
accessibilitybrief mcpRun the MCP server for AI coding agents.
accessibilitybrief --versionPrint the version.

Options

OptionWhat it does
--fail-on critical|serious|moderate|minorExit with code 1 if an issue is at least this severe. Best practices and issues marked won't fix or false positive do not count.
--min-score 0-100Exit with code 1 if the automated score is lower.
--no-waitStart the scan and print its id.
--jsonMachine-readable output.
--locale en|deLanguage of issue titles.
--timeout <minutes>How long to wait for the result (default 20).

Exit codes: 0 passed, 1 a check failed, 2 an error such as a wrong key or an unknown site.

In GitHub Actions

Use the AccessibilityBrief GitHub Action. Store the key as a repository secret named ACCESSIBILITYBRIEF_API_KEY.

- name: Accessibility scan
  uses: accessibilitybrief/scan-action@v1
  with:
    url: https://staging.example.com
    api-key: ${{ secrets.ACCESSIBILITYBRIEF_API_KEY }}
    fail-on: serious

Inputs: url, api-key, fail-on, min-score, locale and timeout, the same as the command's options. The result is written to the job summary and the step fails when a check fails.

In other CI systems

- name: Accessibility scan
  run: npx accessibilitybrief@1 scan https://staging.example.com --fail-on serious
  env:
    ACCESSIBILITYBRIEF_API_KEY: ${{ secrets.ACCESSIBILITYBRIEF_API_KEY }}

Set the environment variable and run the command. This works in GitLab CI, Bitbucket Pipelines, CircleCI and any runner with Node.js 18.17 or newer.

For AI coding agents

The same package runs the MCP server, so AI coding agents such as Claude Code and Cursor can read your scans, fetch fix prompts and start a rescan.

Still stuck? Write to us and we will help. Contact support