Skip to main content

Command line

Last updated

The rankvitals CLI wraps the same REST API. No install step, no dependencies — it reads your key from RANKVITALS_API_KEY (or --key).

Commands

npx rankvitals test https://example.com --mobile
npx rankvitals audit https://example.com
npx rankvitals credits

Budget checks

--json prints a stable machine-readable payload, and --budget-check turns the command into a build gate: it exits 3 when a score or vital misses its budget, so one line fails the job.

npx rankvitals test "$DEPLOY_URL" --mobile \
  --idempotency-key "$GITHUB_SHA" \
  --budget-check "performance>=90,lcp<2500,cls<=0.1"

Budget metrics: performance, structure, seo, ai_readiness (higher is better) and lcp, tbt, cls, fcp, si, tti, ttfb (lower is better). Passing --idempotency-key means a re-run does not spend another credit — see idempotency.

Exit codes

Full reference in the CLI README. For a complete GitHub Actions job built around it, see CI integration.