command not found: testsprite
command not found: testsprite
The global install didn’t put the binary on your
PATH, or it isn’t installed yet.- Confirm Node ≥ 20:
node --version. - Reinstall globally:
npm install -g @testsprite/testsprite-cli. - Or skip the global install entirely and run via
npx @testsprite/testsprite-cli --version.
Auth error (exit 3) / AUTH_FORBIDDEN
Auth error (exit 3) / AUTH_FORBIDDEN
The CLI couldn’t authenticate, or your key is missing a scope.
- Run
testsprite auth whoamito see which profile, key, and scopes are active. - Reconfigure:
testsprite auth configure(interactive) orTESTSPRITE_API_KEY=sk-... testsprite auth configure --from-env. - On
AUTH_FORBIDDEN, the missing scope is named indetails.requiredScope. Generate a new key with the full scope set from the dashboard. - In CI, set
TESTSPRITE_API_KEYin the environment — it overrides the credentials file.
--target-url rejected as a local address
--target-url rejected as a local address
test run and project create pre-flight --target-url and reject local addresses (localhost, 127.x, ::1, 0.0.0.0, link-local, and RFC 1918 ranges), because the cloud runner must be able to reach the URL over the public internet.To test a localhost app, use the TestSprite MCP Server, which opens a tunnel for you. Otherwise point --target-url at a publicly reachable preview or staging URL.test run --wait timed out (exit 7)
test run --wait timed out (exit 7)
The run hadn’t reached a terminal status before
--timeout elapsed — this is not a failure.The JSON response carries the runId. Resume polling without re-triggering the run:test artifact get returns 404 (exit 4)
test artifact get returns 404 (exit 4)
There’s no failure bundle for that run. The
details.reason tells you why:no_failing_run— the run passed, so there’s nothing to download.run_not_ready— the run is still in flight; wait withtestsprite test wait <run-id>.cancelled_no_artifacts— the run was cancelled before producing artifacts.no_code— the test was deleted.
Conflict / precondition failed (exit 6) on test code put
Conflict / precondition failed (exit 6) on test code put
The test’s code changed since you fetched it — the
codeVersion you passed no longer matches the latest.- Re-fetch the latest with
testsprite test code get <test-id>, reapply your edit, and put again. - Pin a known version with
--expected-version <v>. - Or skip the guard with
--force(last writer wins).
Delete refused with a validation error (exit 5)
Delete refused with a validation error (exit 5)
test delete and test delete-batch require --confirm. Without it, the CLI exits 5 with a local validation error before touching the network. Add --confirm.Rate limited (exit 11) / batch rerun deferred[]
Rate limited (exit 11) / batch rerun deferred[]
A per-key run-rate limit shed some work.
- For a single command (exit 11), back off and retry — it’s retriable, and the CLI already retries automatically a few times.
- For a batch rerun, inspect
deferred[]in the JSON and retry those tests with a fresh--idempotency-key.
Insufficient credits (exit 12)
Insufficient credits (exit 12)
This is terminal, not retriable.
- 12 — your account is out of credits; top up from Billing & Plans.
I want to see what a command does without running it for real
I want to see what a command does without running it for real
Append
--dry-run --output json to any command. It runs end-to-end with no network, credentials, or filesystem writes and emits canned data matching the real response shape — the safest way to learn a command’s structure or debug a script.Still stuck?
Discord
Join the community.
Issues & feature requests
File a bug or request a feature on GitHub.
In the terminal
Run
testsprite --help, or testsprite test run --help for any command’s full flag list.