Prerequisites
Before installing, make sure you have:- Node.js >= 20 (Node 22 recommended)
- A TestSprite account — Sign up for free
- A TestSprite API key (you’ll create one in the next section)
How do I check my Node version?
How do I check my Node version?
Run the following in your terminal:If the output is below
v20.0.0, download a newer release from nodejs.org . Node 22 is the recommended version.Where do I get an API key?
Where do I get an API key?
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. If you lose it, just create a new one.See API Keys for the full walkthrough.
Install
Install the CLI globally with npm:Get Your API Key
- Sign in to your TestSprite dashboard .
- Navigate to Settings → API Keys and click Create new key.

- Copy the key — it is shown once only. If you lose it, delete the key and create a new one.

read:me, read:projects, read:tests, write:tests, and run:tests.
Sign In
- One-shot (recommended)
- Manual
Run
testsprite init. It prompts for your API key, verifies it against the platform, and installs the verification skill into your project’s agent configuration — all in one step:init chains credential configuration → identity verification → agent skill install. You only need to run it once per project.Verify
After signing in, confirm the active profile:note: line telling you which commands will be blocked.
Using It in CI
In a CI environment, setTESTSPRITE_API_KEY as a secret and use the non-interactive init flag:
--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