Install
Use Node.js 20.19 or later in the 20.x line, 22.13 or later in the 22.x line, or 24 and above. Install the CLI with npm, then check the installed version.npx @testsprite/testsprite-cli --version.
Get your API key
- Sign in to TestSprite and select the workspace that owns the tests. If you need an account, sign up here.
- Open Workspace Settings → Connections → API Keys, then select New API Key. Open API Keys.

- Copy the key when the dialog opens. You can revoke it and create a replacement if you lose it. API key management.

Sign in
Run setup in the root of your repository, paste your key at the prompt, then verify the workspace.org and scopes lines in the status output before creating a project or starting a run. See Authentication.
To specify one agent, run testsprite setup --agent codex. For credentials only, use testsprite setup --no-agent. You can install additional targets later with testsprite agent install cursor codex. Supported agents and skill updates.
Using it in CI
Expose the workspace key as the CI secretTESTSPRITE_API_KEY. Commands read it from the environment. Check the identity before starting the job’s tests.
Quickstart
Set up your first project, plan a test and run it.
CI/CD integration
Run pull-request checks against a preview deployment.