--help to see its flags inline.
Global flags
These flags must appear before the subcommand (e.g.testsprite --output json test run ...). They apply to every command.
Command tree
Commands
setup — one-shot onboarding
setup — one-shot onboarding
GET /me before writing) and installs the coding-agent skill in one step, then prints a unified summary. This is the only command that writes credentials.--api-key + no --from-env → exit 5. Use --from-env in CI.TestSprite initialized. followed by profile, scopes, agent result, and next steps.doctor — environment diagnostic
doctor — environment diagnostic
GET /me call that validates the key), and whether the verify skill is installed in the current project — and prints an OK/WARN/FAIL report. No flags beyond the global flags.auth — status / remove
auth — status / remove
setup (add --no-agent for credentials only).auth status — show the user, API key, env, and scopes for the active profile. No flags.userId / name / email / keyId / env / scopes. Prints a note: line if write or run scopes are missing.auth remove — remove credentials for the active profile. No flags.
project — list / get / create / update / delete
project — list / get / create / update / delete
ID NAME TYPE FROM CREATED. Appends nextToken: <token> when a next page exists.project get
<project-id> — no flags. Text: id / name / type / createdFrom / createdAt / updatedAt.project create
project update
<project-id> — flags: --name, --url, --username, --password, --password-file, --instruction, --idempotency-key. At least one mutable flag required (else exit 5).project delete
<project-id> — permanently delete a project and everything under it: its frontend/backend sub-projects, all their tests, and backend fixtures (mirrors the Portal’s cascade delete). There is no restore window. --confirm is required — the CLI never prompts; absent it, exit 5 with a local validation error. --dry-run previews the response shape without a network call. Exit codes: 0 success, 3 auth, 4 not found (or already deleted), 5 validation.project credential — static backend auth (free tier)
project credential — static backend auth (free tier)
project auto-auth — recurring-token login (Pro)
project auto-auth — recurring-token login (Pro)
--method password flags: --login-url, --login-method <POST\|PUT>, --login-content-type, --login-body-template (supports {{username}}/{{password}} placeholders), --username, --password (or --password-file), --token-path <jsonpath>.--method refresh_token flags: --token-endpoint, --client-id, --client-secret (or --client-secret-file), --refresh-token (or --refresh-token-file), --scope.--method aws_cognito_refresh flags: --region, plus the refresh-token flags above.test create — create a single test
test create — create a single test
--code-file) or an agent-supplied plan (--plan-from, frontend only). Combine with --run --wait to create and block for a verdict in one command.--run): { testId, type, codeVersion, createdAt, dashboardUrl? }. With --run --wait, merges a run object.--plan-from and --code-file are mutually exclusive. --produces, --needs, and --category only apply to backend tests using --code-file.test create-batch — bulk create FE tests
test create-batch — bulk create FE tests
test scaffold — emit a starter test definition
test scaffold — emit a starter test definition
CliPlanInput — the exact shape --plan-from ingests — with projectId pre-filled from TESTSPRITE_PROJECT_ID when set, or a placeholder pointing at testsprite project list otherwise.test lint — validate plan/steps files offline
test lint — validate plan/steps files offline
test create uses against local plan/steps files, but collect every problem instead of failing on the first one. No network, no credentials.{ checked, valid, issues: [{ file, field, reason }] }. Exit 0 when everything is valid, 5 otherwise — drop it into a pre-commit hook or a CI step before test create-batch.test update — update test metadata & BE dependencies
test update — update test metadata & BE dependencies
test get.test delete & delete-batch — permanently remove tests
test delete & delete-batch — permanently remove tests
<test-id> — permanently delete one test. --confirm is required.test delete-batch — bulk delete by ID list, project, or status filter.
Deleted N, Skipped M, Failed K. A 404 counts as skipped, not an error. Exit 0 all deleted; 1 some failed; 5 validation.test list / get — read tests
test list / get — read tests
--project is required.test get
<test-id> — no flags. JSON: { id, projectId, projectName?, name, type, createdFrom, status, createdAt, updatedAt, planStepCount?, details?, priority?, produces?, consumes?, category? } (the last three appear on backend tests with dependency declarations).test steps — list execution steps
test steps — list execution steps
--run-id to scope to one run.test result — latest result and run history
test result — latest result and run history
--history.CliLatestResult. With --history: { runs: RunHistoryItem[], nextCursor: string|null }. Backend tests also carry apiOutput (the run’s captured stdout) and trace (Python traceback) — full content in JSON; text mode prints a bounded 20-line tail of each.test diff — compare two runs
test diff — compare two runs
failureKind, failedStepIndex, per-step status flips, and codeVersion drift between the two runs. If the runs belong to different tests, the CLI still compares them but prints a warning — the deltas may not be meaningful.Exit 0 when the two verdicts match, 1 when they differ — so it’s scriptable as a regression gate:test run — trigger a run
test run — trigger a run
--wait to block until terminal. Use --all --project <id> for a wave-ordered batch run of every test in the project.--all triggers every test in the project (each billed like any run). A project holds a single test type — frontend or backend — so don’t mix both. On the legacy backend-only batch engine, frontend tests are skipped and reported in skippedFrontend with an advisory — run those individually with test run <test-id>.testsprite test artifact get <run-id> to pull the failure bundle.test wait — wait for one or more runs
test wait — wait for one or more runs
--timeout on test run or test rerun. Accepts several run IDs at once.runId / status / targetUrl / codeVersion / startedAt / finishedAt / steps / dashboard.Several run IDs: the runs poll concurrently under the one shared --timeout, and the output is a { results, summary } envelope instead — the worst status across all members decides the exit code, so one command can wait on everything a batch run or rerun printed a test wait <run-id> hint for.error:<CODE> in that run’s row); 10 transport.test cancel — stop queued/running runs
test cancel — stop queued/running runs
--wait only detaches the CLI while the run keeps executing and billing.[advisory] stderr line.One run ID: exit codes 0 cancelled or already cancelled; 4 run not found; 6 run already finished (passed/failed/blocked).Several run IDs: output is a { cancelled, alreadyCancelled, conflicts, notFound, errors } summary. Exit precedence: any notFound → 4; else any errors → 1; else any conflicts → 6; else 0.Cancelling a Run
test rerun — cheap replay
test rerun — cheap replay
test flaky — replay N times and score stability
test flaky — replay N times and score stability
{ testId, runs, passed, failed, stableRatio, verdict, failures: [...] }.Exit codes: 0 stable (every attempt passed); 1 flaky or failing; 3 auth error; 4 the test has no replayable run yet — trigger testsprite test run <test-id> first; 5 validation error.test code — get / put
test code — get / put
<test-id> — print the generated test code to stdout, or write to a file.{ testId, language, framework, code, codeVersion }. Large code files are fetched transparently — you always receive the full code.test code put
<test-id> — replace test code with ETag-guarded optimistic concurrency.test plan put — replace FE test steps
test plan put — replace FE test steps
planSteps[]. Returns 400 for backend tests — use test code put instead.test failure — get / summary
test failure — get / summary
<test-id> — write a self-contained failure-context bundle for the latest failing run.snapshotId.test failure summary
<test-id> — print a one-screen triage card. No flags.{ testId, status, failureKind, snapshotId, rootCauseHypothesis, recommendedFixTarget }.test artifact get — run-scoped failure bundle
test artifact get — run-scoped failure bundle
runId. Unlike test failure get, this is immutable — a concurrent Portal or scheduled run cannot overwrite it..partial left on disk).agent — install / list / status
agent — install / list / status
testsprite-verify (verification loop) and testsprite-onboard (first-run setup) by default. Pass --skill to install a subset. Pure local — no network, no credentials.{skill} is testsprite-verify or testsprite-onboard. Own-file targets get one file per installed skill; codex merges every installed skill’s contribution into the single managed section.Exit 6 if any target is blocked (exists and differs, no --force).agent list — list supported agent targets, their status, and landing paths (one row per target × installed skill). Pure local, no flags. Text columns:
TARGET SKILL STATUS MODE PATH.agent status — check installed skill files against what this CLI version would install. Pure local, no network.
ok, stale, modified, unmarked, absent, or corrupt (corrupt is codex-only). Exit 1 when anything needs attention (any state other than ok/absent), so it’s CI-gateable.usage — credit balance and plan info
usage — credit balance and plan info
credits, subPlan, creditsPerRun) appear when the backend supplies them.testsprite credits. Calls GET /me.