Skip to content

CLI

The @frontend-debugger/cli package provides the fd command for running audits directly from the terminal.

Installation

bash
npm install -g @frontend-debugger/cli
# or use npx
npx @frontend-debugger/cli <command> <url>

Prerequisites

Chrome must be running with remote debugging enabled:

bash
google-chrome --remote-debugging-port=9222

Commands

fd detect

Detect frontend frameworks on a page.

bash
fd detect http://localhost:3000

fd screenshot

Capture a screenshot to a file.

bash
fd screenshot http://localhost:3000 output.png

fd a11y

Run an axe-core accessibility audit.

bash
fd a11y http://localhost:3000

Exit code: non-zero if violations found.

fd contrast

Check WCAG AA color contrast ratios.

bash
fd contrast http://localhost:3000

fd focus

Analyze keyboard focus order.

bash
fd focus http://localhost:3000

fd aria

Validate ARIA attributes and landmarks.

bash
fd aria http://localhost:3000

fd dark-mode

Compare light vs dark mode rendering.

bash
fd dark-mode http://localhost:3000

fd motion

Check prefers-reduced-motion compliance.

bash
fd motion http://localhost:3000

fd perf

Measure Core Web Vitals (LCP, FCP, CLS, TTFB).

bash
fd perf http://localhost:3000

Exit code: non-zero if any metric is rated "Poor".

fd tokens

Audit design token drift.

bash
fd tokens http://localhost:3000 tokens.json

fd snapshot

Capture a visual baseline.

bash
fd snapshot http://localhost:3000 homepage

fd diff

Compare against a baseline.

bash
fd diff http://localhost:3000 homepage

Exit code: non-zero if diff exceeds threshold.

fd baselines

Manage stored baselines.

bash
fd baselines list
fd baselines delete homepage
fd baselines update homepage

Global options

OptionDefaultDescription
--port <n>9222Chrome debugging port
--host <h>localhostChrome host

Exit codes

All audit commands exit non-zero when issues are found, making them suitable for CI scripts and pre-commit hooks.

Released under the MIT License.