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 creditsBudget 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
0— pass1— the test failed or timed out2— usage or auth error3— budget breached
Full reference in the CLI README. For a complete GitHub Actions job built around it, see CI integration.