CLI
The @frontend-debugger/cli package provides the fd command for running audits directly from the terminal.
Installation
npm install -g @frontend-debugger/cli
# or use npx
npx @frontend-debugger/cli <command> <url>Prerequisites
Chrome must be running with remote debugging enabled:
google-chrome --remote-debugging-port=9222Commands
fd detect
Detect frontend frameworks on a page.
fd detect http://localhost:3000fd screenshot
Capture a screenshot to a file.
fd screenshot http://localhost:3000 output.pngfd a11y
Run an axe-core accessibility audit.
fd a11y http://localhost:3000Exit code: non-zero if violations found.
fd contrast
Check WCAG AA color contrast ratios.
fd contrast http://localhost:3000fd focus
Analyze keyboard focus order.
fd focus http://localhost:3000fd aria
Validate ARIA attributes and landmarks.
fd aria http://localhost:3000fd dark-mode
Compare light vs dark mode rendering.
fd dark-mode http://localhost:3000fd motion
Check prefers-reduced-motion compliance.
fd motion http://localhost:3000fd perf
Measure Core Web Vitals (LCP, FCP, CLS, TTFB).
fd perf http://localhost:3000Exit code: non-zero if any metric is rated "Poor".
fd tokens
Audit design token drift.
fd tokens http://localhost:3000 tokens.jsonfd snapshot
Capture a visual baseline.
fd snapshot http://localhost:3000 homepagefd diff
Compare against a baseline.
fd diff http://localhost:3000 homepageExit code: non-zero if diff exceeds threshold.
fd baselines
Manage stored baselines.
fd baselines list
fd baselines delete homepage
fd baselines update homepageGlobal options
| Option | Default | Description |
|---|---|---|
--port <n> | 9222 | Chrome debugging port |
--host <h> | localhost | Chrome host |
Exit codes
All audit commands exit non-zero when issues are found, making them suitable for CI scripts and pre-commit hooks.