CLI Usage
Basic Commands
bash
# Audit all pillarsnpx web-guard --url https://example.com
# Use a presetnpx web-guard --url https://example.com --preset recommended
# Specific pillarsnpx web-guard --url https://example.com --pillars performance,seo
# Desktop emulationnpx web-guard --url https://example.com --device desktop
# JSON output for CInpx web-guard --url https://example.com --json --ciCLI Options
| Flag | Default | Description |
|---|---|---|
| --url <url> | — | URL to audit |
| --preset <name> | — | Use built-in preset (lenient, recommended, strict) |
| --device <type> | mobile | Emulation device (mobile or desktop) |
| --pillars <list> | all | Comma-separated pillars to run |
| --json | false | JSON output mode |
| --ci | false | CI mode (no colors, machine-readable) |
| --help | — | Show help message |
Exit Codes
| Code | Meaning | Description |
|---|---|---|
| 0 | Pass | All pillars passed their thresholds |
| 1 | Fail | One or more pillars failed |
| 2 | Error | Configuration or runtime error |
Available Pillars
| Pillar | Description |
|---|---|
| performance | Lighthouse performance score + Web Vitals (LCP, CLS, INP, TTFB, FCP) |
| a11y | WCAG accessibility violations via axe-core |
| seo | Title, meta description, headings, canonical, robots, sitemap |
| schema | JSON-LD structured data validation |
| security | Security response headers check |
| ux | Viewport, image dimensions, touch targets, font-display |
Pillars run sequentially, sharing a single browser instance for efficiency. Performance uses its own Chrome instance via chrome-launcher.