Skip to main content

Prerequisites

Before installing, make sure you have:
  • Node.js 20.19+, 22.13+, or 24+ (the odd-numbered releases 21.x and 23.x are not supported)
  • A TestSprite account — Sign up for free
  • A TestSprite API key (you’ll create one in the next section)
Run the following in your terminal:
The CLI requires 20.19+, 22.13+, or 24+ — the odd-numbered releases (21.x, 23.x) aren’t supported. If your version doesn’t fall in one of those ranges, download a newer release from nodejs.org . The CLI also checks the Node version at startup and exits with a clear message if it’s too old.
Sign in to your TestSprite dashboard, navigate to Settings → API Keys, and click Create new key. The key is shown exactly once — copy it before closing the dialog. The key you get is a workspace key (sk-member-...), bound to whichever workspace’s page you were on, and capped at 2 active per member per workspace. (TestSprite also has an older personal key kind, sk-user-... — if you already hold one it keeps working, but new keys are always workspace keys.) If you lose it, revoke it and create a new one — revoke one of the existing keys first if you’re already at the cap.See API Keys for the full walkthrough, including personal vs. workspace keys.

Install

Install the CLI globally with npm:
Alternatively, run it without installing using npx:
Verify the installation:
The CLI’s source code, releases, and issue tracker live on GitHub.

Get Your API Key

  1. Sign in to your TestSprite dashboard .
  2. Navigate to Settings → API Keys and click Create new key.
API Keys page with the Create new key button
  1. Copy the key — it is shown once only. If you lose it, revoke it and create a new one. (A workspace key is capped at 2 active per member per workspace — revoke one first if you’re already at the limit.)
API Key Created dialog with the copy button
New and grandfathered keys both default to the scopes the CLI needs: read:me, read:projects, read:tests, write:tests, and run:tests.

Sign In

testsprite setup is the single onboarding command — it configures credentials, verifies them, and installs the agent skill in one pass. Add --no-agent when you only want credentials.

Verify

After signing in, confirm the active profile:
If any scopes are missing, the CLI prints a note: line telling you which commands will be blocked.

Using It in CI

In a CI environment, set TESTSPRITE_API_KEY as a secret and run setup non-interactively:
--from-env reads the key from the environment instead of prompting. --yes accepts all defaults without interactive prompts. The CLI never accepts the API key as a positional argument or writes it to logs.

CI/CD Integration

The full CI setup — pipeline examples and exit code handling

Where to Go Next

Quickstart

Create a test, run it, and read the failure bundle end to end

Authentication

Profiles, env vars, scope errors, and rotating keys

Key Terms

Projects, tests, runs, and the object model

CI/CD Integration

Pipeline examples and non-interactive setup