Overview
The Spur CLI (@spurtest/cli on npm) runs your Spur tests from a terminal or a CI job. It waits for the run, prints each test’s result with a link to it in Spur, and exits with a non-zero code when a test fails, so your pipeline can block a merge or deploy.
Before you begin
- Node.js 22.12 or later.
- A Spur account with access to the Application whose tests you want to run.
Sign in
On your own computer, sign in with your browser:npx @spurtest/cli logout to sign out.
In CI, use an API key instead. Generate one under Integrations → MCP, as described in API key (no OAuth), store it as a secret in your CI provider, and expose it to the CLI as the SPUR_API_KEY environment variable. It’s a different key from the GitHub integration key, so store it under its own secret name, such as SPUR_MCP_API_KEY.
Find tests and environments
Run tests
Exit codes
Run in CI
This GitHub Actions step runs two tests against a deploy preview that needs a Vercel protection-bypass header, and writes a JUnit report. It reads the preview URL from an earlier step with the iddeploy and the output preview_url; replace both with your own deploy step’s.
Both secrets are yours, stored in your GitHub repository: SPUR_MCP_API_KEY is the API key you created in Spur, and VERCEL_AUTOMATION_BYPASS_SECRET is your Vercel project’s Protection Bypass for Automation secret.
Corporate proxies
SetHTTPS_PROXY (and NO_PROXY as needed) for the CLI’s connections to Spur, even if the proxy itself speaks plain HTTP: Spur’s addresses are HTTPS, so HTTP_PROXY alone doesn’t apply to them. If your proxy inspects TLS, add its CA certificate with NODE_EXTRA_CA_CERTS.