Command Reference
Every command, flag, and option available in the WCAG Audit CLI.
install
The CLI is installed via a license-gated curl command — not npm. Replace <your-license-key> with your actual key:
curl -fsSL https://wcagaudit.io/install | bash -s -- <your-license-key>After install, all commands are available as wcag-audit. Your license key is saved automatically — no separate init step needed.
verify
Deterministic-only re-verify of a specific finding by rc-id. Runs the same rule-based checkers as the scan — no AI, no credit cost. Used by WCAG_FIXES.prompt.md to validate each fix before the agent moves on to the next finding.
wcag-audit verify rc-014dismiss
Record a confirmed false positive in .wcag-audit/false-positives.json. The finding won't appear in future scans (identified by stable sha1 fingerprint). Reason must be ≥ 20 characters — this forces a real WCAG analysis.
wcag-audit dismiss rc-014 --reason "This element is not interactive and does not need a label per WCAG 1.3.1"LLM fix-pass agents can call dismiss directly when they determine the rule is firing incorrectly. The reason is stored for traceability and appears in the next scan's false-positive summary.
plugin-init
Auto-installs @wcag-audit/next-plugin into your Next.js project. Wraps next.config.{js,ts,mjs} with withWcagAudit() and adds WCAG_AUDIT=1 to .env.local. With the plugin active, every finding is mapped to an exact file:line, enabling the 10 deterministic codemods to apply at scan time. Production builds are no-ops when WCAG_AUDIT is not set.
wcag-audit plugin-initscan
Audit every route in the current project. Detects your framework, starts the dev server, and runs all 12 checkers on each page.
wcag-audit scanscan --auth
Opens a visible browser for interactive login. The CLI captures the session and audits all routes including authenticated pages.
wcag-audit scan --authscan --auth-storage
Use a saved Playwright session file for headless authenticated scans (ideal for CI).
# Export session once:
wcag-audit scan --auth --export-auth ./auth.json
# Reuse headlessly:
wcag-audit scan --auth-storage ./auth.jsonscan --url
Crawl a deployed site via BFS instead of reading local framework routes.
wcag-audit scan --url https://example.comscan --url with crawl depth
Control how many link levels deep the crawler follows.
wcag-audit scan --url https://example.com --crawl-depth 3scan --dry-run
Preview how many pages will be scanned and the credit cost. No browser launches, no credits consumed.
wcag-audit scan --dry-runFound 24 routes. Estimated cost: 24 credits.
No scan performed — dry run only.scan --no-ai
Skip the AI vision review. Runs only the 11 rule-based checkers. Faster, useful for rapid local iteration.
wcag-audit scan --no-aiscan --no-cache
Ignore the 24-hour route cache and re-audit everything.
wcag-audit scan --no-cachescan --resume
Resume an interrupted scan from where it left off.
wcag-audit scan --resumescan --routes
Scan only routes listed in a text file (one URL per line).
# routes.txt:
# /
# /about
# /pricing
# /dashboard
wcag-audit scan --routes ./routes.txtscan --full --coverage
Full scan with coverage stats output.
wcag-audit scan --auth --full --coverageci
CI-optimized scan. Exits with code 1 when findings at the specified severity threshold are found. Designed for pipeline gates.
wcag-audit ci --fail-on criticalThreshold options: critical (default), serious, moderate, minor, none.
ci with auth
wcag-audit ci --fail-on serious --auth-storage ./auth.jsonwatch
Watch source files and auto-rescan when changes are detected (2-second debounce).
wcag-audit watchdoctor
Diagnose your setup: license status, AI vision availability, framework detection, dev server config.
wcag-audit doctorconfig
Print current config with secrets masked.
wcag-audit configaudit (legacy)
Audit a single URL. Prefer scan for full projects.
wcag-audit audit https://example.com/pricingCommon fix recipes
The 10 most common findings and how they're fixed. The Auto-fix column shows whether the codemod handles it automatically when @wcag-audit/next-plugin is installed.
text-spacing-clip — WCAG 1.4.12 AA
Triggers: truncate / line-clamp-N on text containers.
Auto-fix (codemod): Strips those classes and adds min-w-0 break-words.
Manual fix: Drop overflow: hidden, replace fixed height with min-height, and add overflow-wrap: anywhere; word-break: break-word.
fixed-width-overflow — WCAG 1.4.10 AA
Triggers: w-[Npx] / min-w-[Npx] without a breakpoint prefix.
Auto-fix (codemod): Replaces with max-w-full.
Manual fix: Add max-width: 100%; min-width: 0; box-sizing: border-box to the rule.
color-contrast — WCAG 1.4.3 AA
Triggers: Text color insufficient against ancestor background.
Auto-fix (codemod): Bumps text-gray-{300,400,500} to the smallest darker step that reaches 4.5:1 (detects bg-* from ancestor chain).
Manual fix: Pick a darker foreground or lighter background; verify with the WebAIM contrast checker.
label-content-name-mismatch — WCAG 2.5.3 A
Triggers: Element has both aria-label and visible text and they don't match.
Auto-fix (codemod): Drops the redundant aria-label when normalized text matches.
Manual fix: Either drop the aria-label or rewrite it to start with the visible text exactly.
redundant-alt — WCAG 1.1.1 A
Triggers: alt="image of …" / alt="picture of …".
Auto-fix (codemod): Strips redundant prefixes (image of, picture of, photo of, graphic of, icon of).
Manual fix: Describe the content, not the medium.
button-name — WCAG 4.1.2 A
Triggers: <button> with no accessible name (icon-only, no text, no aria-label).
Auto-fix (codemod): Promotes title or data-tooltip attribute to aria-label.
Manual fix: Add aria-label="<action verb>" describing the button's action.
link-name — WCAG 4.1.2 / 2.4.4
Triggers: <a> with no accessible name.
Auto-fix (codemod): Promotes title / data-tooltip to aria-label (same as button-name).
Manual fix: Add visible link text or aria-label.
image-alt — WCAG 1.1.1 A
Triggers: <img> / <Image> with no alt attribute.
Auto-fix (codemod): Adds alt="" (decorative marker per WCAG).
Manual fix: Add descriptive alt for content images; empty alt="" for decorative.
lang-html — WCAG 3.1.1 A
Triggers: <html> missing lang attribute.
Auto-fix (codemod): Adds lang="en".
Manual fix: Customize to your actual language code.
missing-form-label — WCAG 1.3.1 / 4.1.2
Triggers: <input> / <select> / <textarea> without label association and without aria-label / aria-labelledby.
Auto-fix (codemod): When the input has placeholder="X", copies it into aria-label="X" (preserves placeholder for non-AT users).
Manual fix: Add a proper <label htmlFor="…"> or aria-label.