Usage via CLI

A command instead of code — no test framework or Node script required, good for a pipeline step or a quick check against a build artifact.

First scan

$ npm install -g @surea11y/cli
$ surea11y scan ./index.html
$ surea11y scan https://example.com/ --tags wcag2a,wcag2aa

Requires Node.js ^20.19.0 || ^22.13.0 || >=24.0.0.

$ surea11y scan ./index.html
surea11y scan: file:///path/to/index.html
pass: 6 fail: 3 cantTell: 4 notApplicable: 112
occurrences by tier: fail: 3 cantTell: 5
FAIL (3 rule(s)):
contrast-minimum (serious, 1 fail occurrence(s))
- html > body > main > p
Element has insufficient color contrast of 2.85:1 (foreground: #999999,
background: #ffffff, font size: 0px, font weight: normal). Expected
contrast ratio of 4.5:1 (normal text).
cantTell — needs human review (4 rule(s)): contrast-computable, link-name-quality,
manual-review, page-title-patterns

Limitations

cantTell never affects the exit code: 0 clean, 1 at least one — or, scanning with --baseline, one newfail (the CI-gating case; see Baseline / allowlist for what counts as "known" vs. "new"), 2 a usage/scan error. The CLI reads static HTML only — a local file, or the raw body of an HTTP(S) GET — and never executes page JavaScript. For client-rendered pages, use one of the bindings instead, or call the engine directly against a real, driven browser (see INTEGRATION.md Pattern 2).

Full flag reference, custom-rule contract, and CI recipes: docs/CLI.md. For CI-pipeline templates specifically, see CI integration.