Signing in
Store a valid API key before running any command that calls the TestSprite API. The fastest path istestsprite setup, which prompts for the key, verifies it with the server, installs the agent skill into your repo, and prints a summary:
AGENT with claude, cursor, cline, windsurf, antigravity, kiro, copilot or codex. For credentials only, use --no-agent. A rejected key never overwrites a working profile. See Installation for the full walkthrough.
Checking who you are
org: line is the workspace the key acts in, with its plan and your role there; orgs: lists every workspace you belong to. While that workspace is paused, a workspace: line says so and links to billing. If the key lacks write:tests or run:tests, a note: line lists the gap. Add --output json for machine-readable output.
Signing out
~/.testsprite/credentials; other profiles are untouched.
Profiles
Credentials live in~/.testsprite/credentials (an INI file, mode 0600). Each section is a named profile. Because a key acts in one workspace, a profile per workspace is how you work across several; profiles also keep an interactive key apart from a CI key:
5. Resolution order is --profile > TESTSPRITE_PROFILE > default for the profile, and TESTSPRITE_API_KEY > the profile’s file entry for the key. See Configuration.
Scopes
Keys carry scopes that gate commands. A key minted in the portal gets every scope below, narrowed to your role in its workspace: Owner, Admin, and Member keep them all, and a Viewer has none, so every command is refused. Check yours withauth status. Existing keys can already use --local.
agent install is local-only and needs no scope; setup works with any valid key.
A scope error prints the required and granted scopes. The portal has no scope picker, so a key holds every scope your role allows. An empty granted list means your role in that workspace is Viewer: ask an Admin or the Owner to make you a Member.
Keys and workspaces
A key acts in the workspace it was minted in. Switch to that workspace in the portal and mint the key under Workspace Settings → Connections → API Keys: everything the CLI creates with it belongs to that workspace and draws on its balance, andauth status names it on the org: line. To work in another workspace, mint a key there and store it as a separate profile.
Keys need the Member role or above, and stop working when you leave or are removed from the workspace. None can be minted while the workspace is paused. You can hold 2 active keys per workspace, so revoke one before replacing a lost key at the cap. Keys starting with sk-user- predate workspace keys; they keep working and always act in your default workspace. See API Keys.
Where to Go Next
Projects
Create and manage projects
CI/CD Integration
Non-interactive auth for pipelines