Quick web performance audits from your terminal. Lighthouse scores, Core Web Vitals, and actionable suggestions — no browser needed.
You're deploying a site and want to check performance. Opening DevTools, navigating to Lighthouse, waiting for the audit... it's slow and manual. webperf gives you the same data in your terminal, perfect for CI pipelines and quick checks.
npm install -g webperfOr run directly:
npx webperf https://your-site.comwebperf https://example.comwebperf https://example.com --jsonwebperf https://example.com --runs 3webperf https://example.com --no-mobilewebperf https://example.com --output report.md
webperf https://example.com --output report.json --jsonwebperf https://example.com --categories performance accessibilitywebperf https://example.com --quiet- Lighthouse scores — Performance, Accessibility, Best Practices, SEO (0-100)
- Core Web Vitals — FCP, LCP, CLS, TBT, Speed Index, TTI, TTFB with good/needs work/poor ratings
- Suggestions — Sorted by impact (high → medium → low), tells you what to fix first
# GitHub Actions example
- name: Performance check
run: |
npx webperf https://staging.example.com --json > perf-report.json
# Fail if performance score < 80
SCORE=$(cat perf-report.json | node -e "const d=require('fs').readFileSync('/dev/stdin','utf8');const j=JSON.parse(d);console.log(j.scores.performance)")
if [ "$SCORE" -lt 80 ]; then
echo "Performance score $SCORE is below threshold"
exit 1
fi| Flag | Alias | Description |
|---|---|---|
--json |
-j |
Output as JSON |
--output <file> |
-o |
Save report (md or json) |
--runs <n> |
-n |
Number of runs to average (1-5) |
--categories <list> |
-c |
Categories: performance, accessibility, best-practices, seo, pwa |
--mobile |
-m |
Mobile emulation (default: true) |
--quiet |
-q |
Only show scores |
- Node.js 18+
- Chrome/Chromium (for Lighthouse — auto-detected via chrome-launcher)
MIT