testsprite --help to list commands and testsprite <command> --help for the options and examples for one command.
Global flags
Command tree
Setup and account
Projects and environments
Create the project first, then give it an environment. The first environment becomes the default. In the examples, setPROJECT_ID to the ID printed by project create.
project listandproject get <id>show project metadata.project updateaccepts a name, agent instructions and frontend locator preferences. Useproject delete <id> --confirmto permanently remove a project.project env createtakes--url; for a frontend on this machine,--local <port>is shorthand for--url http://localhost:<port>. A backend project’s environment must point at a publicly deployed API. On a frontend environment set--sign-in public|account|otp|manual; use--usernameand--password-filefor a test account. Change an existing environment’s sign-in mode in the Portal.project env update <project-id> <name>can change the URL, account credentials, variables or name.--var KEY=VALUEsets a non-secret value. Useproject env set-default <project-id> <name>to switch the default andproject env delete <project-id> <name> --confirmto remove an environment.- On a backend environment,
createandupdateaccept--auth none|bearer|basic|apikey,--credential-file <path>, repeatable--header "Name: value",--header-file <path>, or--auto-auth-file <path>for a sign-in that refreshes the credential. Reads redact secrets.
Plan and review tests
Follow-up commands use the conversation last selected in this folder. Pass
--project <id> --conversation <id> to select it explicitly and --card <id> on apply or reject to identify the proposal. Use --no-wait on plan, reply, apply or reject to return immediately and status --wait to follow progress later.
Test definitions
test list follows all pages by default. Use --max-items <n> to cap the total, or --page-size <n> (1–100) and --starting-token <token> to fetch one page at a time. Cases have an id, slug, title, type, version and step count. Read the latest outcome with result list --test <test-id> --limit 1. Inspect generated code in the Portal.
Launch, wait and cancel
A project selector excludes positional test IDs and list selection. With no selector,
run reads TESTSPRITE_PROJECT_ID. Named tests are grouped into one run per project, with up to 5,000 selected IDs per project. List runs use their saved project/environment bindings.
run prints executions in runs[] and individual results in results[]. A launch can return before any result rows exist. A blocked, failed or cancelled result can be inspected by its resultId. To resume or cancel, use the execution’s runId.
Results and evidence
result listrequires exactly one of--runor--test. Both accept--statuswithpassed,failed,running,blockedorcancelled. Includecancelledexplicitly to see cancelled results. Test history is newest first and accepts--envand--limit(1–100, default 20).result gettakes a result ID. Its JSON includes the error, cause, suggested fix, steps, failed step, video and any backend traceback and captured output. A successful read exits 0 for any verdict.--outcreates the directory and writesresult.jsonand available evidence, includingsteps/and sign-in evidence where available.--failed-onlykeeps failed steps and one neighbor on each side, or all steps if none failed. A partial download exits 10. See Reading Results.
Test lists and schedules
testlist create --name <name> creates a list. Use add or remove with the list ID and test IDs to change its members. Bind environments with repeatable --project-env <project-id>:<name> on create or update. testlist list and testlist get expose lastRunId and lastRunCreated when available. Deleting a list with --confirm also deletes its schedules.
schedule create takes --name, --cron, --target-type project|testList and --target-id. A five-field cron uses UTC unless you set --timezone. A project schedule inherits the project’s default or can be pinned with --env. A list schedule uses the list’s bindings. Use schedule list, schedule get or schedule update --pause / --resume to manage it. View past schedule executions in the Portal. See Test Lists & Schedules.
CI
ci init githubgenerates a GitHub Actions workflow. Select the project and saved environment with--projectand--env. Use--pathto choose the workflow filename.--set-secretwrites or replaces the API key secret viaghin the chosen repository.ci runselects a project, always waits, and gates on the verdict. Use--target-urlfor a preview URL or--wait-for-statusand--target-url-templatefor a preview announced by a check.--fail-on-skippedfails the check for skipped tests.--summary-filewrites the CI summary, and--report junit --report-file <path>adds JUnit XML. See CI/CD.
Coding agents and tunnels
agent listshows available targets and skills.agent install [targets...]writes guidance for your coding agent, andagent statuschecks the installed guidance. Refresh a stale target withagent install <target> --force. See Coding Agent Integration.tunnel startopens a foreground tunnel. The agent opens an app on this machine through it while it plans, andrun --env <name> --tunnel-client <id>with a project or test selector attaches a run to it.tunnel listshows active bindings,tunnel status <client-id>checks one andtunnel stop <client-id>revokes it.tunnel stop --all --confirmrevokes all your bindings, including those used by other jobs. See Local Apps.