Skip to main content
Settings resolve in this order: flags, environment variables, the credentials file (~/.testsprite/credentials), then built-in defaults.

Global flags

Global flags apply to one invocation and can go before or after the subcommand. Descriptions: Command Reference.

Credentials file and profiles

~/.testsprite/credentials is an INI file (directory 0700, file 0600, atomic writes). Each profile is a section holding an api_key, for example one for interactive use and one for CI.
testsprite setup writes a profile; --from-env skips the prompt in CI. Select a profile per command or per shell session:

Environment variables

Profile: --profile, then TESTSPRITE_PROFILE, then default. API key: TESTSPRITE_API_KEY, then the active profile’s api_key. The CLI never logs the key.

Output

--output json is the stable contract (Output & Scripting). Errors become a JSON envelope on stderr; exit codes are stable in either mode (Exit Codes & Errors).

Request timeouts

--request-timeout <seconds> (1–600, default 120) limits each HTTP request; as a variable it is milliseconds: TESTSPRITE_REQUEST_TIMEOUT_MS=30000. It does not affect the --timeout on test run --wait, test wait or test rerun --wait. On run completion and on test create / test create-batch, JSON output may include dashboardUrl (text mode prints Dashboard:), a deep link to the test in the Web Portal. The backend builds it; if it offers none the CLI computes one from projectId + testId. If no correct link exists, no URL is printed (an [advisory] points at test get <id>) rather than one that would 404. The field is absent under --dry-run.