@testsprite/testsprite-cli 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +26 -1
  2. package/dist/commands/agent.js +17 -6
  3. package/dist/commands/auth.d.ts +46 -0
  4. package/dist/commands/auth.js +37 -2
  5. package/dist/commands/completion.d.ts +36 -0
  6. package/dist/commands/completion.js +111 -0
  7. package/dist/commands/doctor.js +20 -2
  8. package/dist/commands/init.d.ts +32 -1
  9. package/dist/commands/init.js +40 -10
  10. package/dist/commands/project.d.ts +77 -3
  11. package/dist/commands/project.js +176 -43
  12. package/dist/commands/test.d.ts +160 -10
  13. package/dist/commands/test.js +1261 -303
  14. package/dist/commands/usage.d.ts +56 -17
  15. package/dist/commands/usage.js +144 -29
  16. package/dist/index.js +132 -26
  17. package/dist/lib/browser.d.ts +6 -0
  18. package/dist/lib/browser.js +54 -0
  19. package/dist/lib/bundle.d.ts +32 -31
  20. package/dist/lib/bundle.js +125 -83
  21. package/dist/lib/client-factory.d.ts +23 -0
  22. package/dist/lib/client-factory.js +33 -1
  23. package/dist/lib/config.js +7 -3
  24. package/dist/lib/credentials.d.ts +17 -1
  25. package/dist/lib/credentials.js +175 -16
  26. package/dist/lib/dry-run/samples.js +15 -1
  27. package/dist/lib/errors.d.ts +6 -1
  28. package/dist/lib/errors.js +70 -19
  29. package/dist/lib/flaky.d.ts +12 -1
  30. package/dist/lib/flaky.js +7 -12
  31. package/dist/lib/gh-output.d.ts +62 -0
  32. package/dist/lib/gh-output.js +99 -0
  33. package/dist/lib/http.d.ts +33 -15
  34. package/dist/lib/http.js +68 -6
  35. package/dist/lib/org-render.d.ts +52 -0
  36. package/dist/lib/org-render.js +59 -0
  37. package/dist/lib/poll.js +1 -1
  38. package/dist/lib/render-error.d.ts +14 -0
  39. package/dist/lib/render-error.js +30 -0
  40. package/dist/lib/response-schemas.d.ts +83 -0
  41. package/dist/lib/response-schemas.js +272 -0
  42. package/dist/lib/runs.types.d.ts +53 -8
  43. package/dist/lib/skill-nudge.d.ts +17 -0
  44. package/dist/lib/skill-nudge.js +19 -0
  45. package/dist/lib/telemetry.d.ts +90 -0
  46. package/dist/lib/telemetry.js +171 -0
  47. package/dist/lib/text-table.d.ts +14 -0
  48. package/dist/lib/text-table.js +45 -0
  49. package/dist/lib/v3-advisory.d.ts +10 -1
  50. package/dist/lib/v3-advisory.js +12 -4
  51. package/dist/version.d.ts +1 -1
  52. package/dist/version.js +1 -1
  53. package/package.json +16 -5
  54. package/schemas/plan.schema.json +61 -0
  55. package/skills/testsprite-verify.codex.md +2 -2
  56. package/skills/testsprite-verify.skill.md +3 -3
@@ -0,0 +1,171 @@
1
+ /**
2
+ * Client-side telemetry: one "command outcome" event per CLI invocation,
3
+ * fired to the backend beacon (`POST /api/cli/v1/telemetry`), which forwards it
4
+ * to PostHog server-side. The CLI ships no PostHog SDK / write-key.
5
+ *
6
+ * Contract:
7
+ * - Best-effort: every failure is swallowed; telemetry NEVER changes a
8
+ * command's behavior, output, or exit code.
9
+ * - Bounded: the POST is aborted after {@link TELEMETRY_TIMEOUT_MS}, so the
10
+ * flush-before-exit can add at most that long to a slow/unreachable-backend
11
+ * invocation (normal case is a sub-200ms POST).
12
+ * - Authenticated-only: skipped when no api-key is configured (the backend
13
+ * keys the event on the api-key's user; anonymous events are out of scope).
14
+ * - Opt-out: skipped when `TESTSPRITE_NO_TELEMETRY` or the cross-tool
15
+ * `DO_NOT_TRACK` is set. Also skipped under `--dry-run` (no network) and
16
+ * when no leaf command actually ran (bare `--help` / parse errors).
17
+ * - Never on abort (SIGINT/SIGTERM): Ctrl-C must exit immediately, so the
18
+ * abort path emits nothing (awaiting would delay shutdown; fire-and-forget
19
+ * would be cut off before delivery anyway).
20
+ *
21
+ * Privacy: the event is a fixed allowlist of low-cardinality, PII-free fields.
22
+ * It NEVER carries target URLs, api keys, flag values, arg values, or error
23
+ * messages — `errorCode` is a stable machine code, never the human message.
24
+ */
25
+ import { CommanderError } from 'commander';
26
+ import { loadConfig } from './config.js';
27
+ import { defaultCredentialsPath } from './credentials.js';
28
+ import { ApiError, CLIError, InterruptError, RequestTimeoutError } from './errors.js';
29
+ import { facadeBaseUrl } from './facade.js';
30
+ import { VERSION } from '../version.js';
31
+ /**
32
+ * Max time the flush-before-exit will wait on the beacon POST. Kept short so a
33
+ * slow/unreachable backend adds at most this to a command's exit (including
34
+ * Ctrl-C); a healthy POST completes in well under it, and when it doesn't,
35
+ * dropping the event is the correct best-effort behavior.
36
+ */
37
+ export const TELEMETRY_TIMEOUT_MS = 1000;
38
+ /**
39
+ * Map a thrown CLI error to its telemetry disposition — mirrors the exit-code
40
+ * mapping in `index.ts`'s top-level catch so telemetry and the process exit
41
+ * code never disagree. Pure; safe to unit-test.
42
+ */
43
+ export function classifyCliError(err) {
44
+ if (err instanceof InterruptError) {
45
+ return { outcome: 'abort', exitCode: err.exitCode, errorCode: 'INTERRUPTED' };
46
+ }
47
+ if (err instanceof RequestTimeoutError) {
48
+ return { outcome: 'error', exitCode: err.exitCode, errorCode: 'REQUEST_TIMEOUT' };
49
+ }
50
+ if (err instanceof ApiError) {
51
+ return { outcome: 'error', exitCode: err.exitCode, errorCode: err.code };
52
+ }
53
+ if (err instanceof CommanderError) {
54
+ // Help / version are user-requested successes (exit 0); everything else
55
+ // Commander throws is a parse/validation error (exit 5).
56
+ if (err.code === 'commander.helpDisplayed' ||
57
+ err.code === 'commander.help' ||
58
+ err.code === 'commander.version') {
59
+ return { outcome: 'success', exitCode: 0 };
60
+ }
61
+ return { outcome: 'error', exitCode: 5, errorCode: 'VALIDATION_ERROR' };
62
+ }
63
+ if (err instanceof CLIError) {
64
+ return { outcome: 'error', exitCode: err.exitCode };
65
+ }
66
+ return { outcome: 'error', exitCode: 1 };
67
+ }
68
+ /** True when the operator has opted out via either supported env var. */
69
+ export function isTelemetryOptedOut(env) {
70
+ return isTruthyEnv(env.TESTSPRITE_NO_TELEMETRY) || isTruthyEnv(env.DO_NOT_TRACK);
71
+ }
72
+ function isTruthyEnv(v) {
73
+ if (v === undefined)
74
+ return false;
75
+ const t = v.trim().toLowerCase();
76
+ return t !== '' && t !== '0' && t !== 'false';
77
+ }
78
+ /** Assemble the allowlisted wire event. No URL / message / flag value ever. */
79
+ export function buildTelemetryEvent(input, env, isTTY) {
80
+ return {
81
+ command: input.command,
82
+ outcome: input.outcome,
83
+ exitCode: input.exitCode,
84
+ ...(input.errorCode ? { errorCode: input.errorCode } : {}),
85
+ durationMs: input.durationMs,
86
+ cliVersion: VERSION,
87
+ os: process.platform,
88
+ nodeVersion: process.versions.node,
89
+ ...(input.output === 'json' || input.output === 'text' ? { output: input.output } : {}),
90
+ ci: isTruthyEnv(env.CI) || !isTTY,
91
+ };
92
+ }
93
+ /**
94
+ * Resolve just the (apiKey, apiUrl) pair telemetry needs. Called once from the
95
+ * `index.ts` preAction hook — BEFORE the command's own action runs — so a
96
+ * command that mutates the credentials file (`auth remove` deletes the profile)
97
+ * is still reported on the key it ran under. The hook only calls this for a
98
+ * telemetry-eligible, non-opted-out, non-dry-run invocation, so a gated-out or
99
+ * opted-out call never reads the credentials file.
100
+ */
101
+ export function resolveTelemetryAuth(opts, deps = {}) {
102
+ const config = loadConfig({
103
+ profile: opts.profile ?? 'default',
104
+ endpointUrl: opts.endpointUrl,
105
+ env: deps.env ?? process.env,
106
+ credentialsPath: deps.credentialsPath ?? defaultCredentialsPath(),
107
+ });
108
+ return { apiKey: config.apiKey, apiUrl: config.apiUrl };
109
+ }
110
+ /**
111
+ * Fire one command-outcome event to the beacon. Awaited by `index.ts` before
112
+ * `process.exit` (the flush) — bounded and fully best-effort, so it can neither
113
+ * hang nor throw. Skips silently when opted out, under dry-run, with no leaf
114
+ * command, or when no api-key is configured.
115
+ */
116
+ export async function recordOutcome(input, deps = {}) {
117
+ try {
118
+ const env = deps.env ?? process.env;
119
+ if (isTelemetryOptedOut(env))
120
+ return;
121
+ if (input.dryRun)
122
+ return;
123
+ if (!input.command)
124
+ return; // no leaf command ran (bare --help / parse error)
125
+ // Never on the abort path: Ctrl-C / SIGTERM must exit immediately. Awaiting
126
+ // a beacon post here would delay shutdown by up to the bounded timeout, and
127
+ // a fire-and-forget post would be cut off by process.exit before delivery —
128
+ // so the event would be unreliable anyway. Aborts are simply not reported.
129
+ if (input.outcome === 'abort')
130
+ return;
131
+ // Prefer auth the preAction hook already resolved (before a command like
132
+ // `auth remove` could delete the profile); fall back to a fresh read.
133
+ const config = deps.resolvedAuth ??
134
+ loadConfig({
135
+ profile: input.profile ?? 'default',
136
+ endpointUrl: input.endpointUrl,
137
+ env,
138
+ credentialsPath: deps.credentialsPath ?? defaultCredentialsPath(),
139
+ });
140
+ if (!config.apiKey)
141
+ return; // authenticated-only
142
+ const url = `${facadeBaseUrl(config.apiUrl)}/telemetry`;
143
+ const isTTY = deps.isTTY ?? process.stderr.isTTY === true;
144
+ const body = buildTelemetryEvent(input, env, isTTY);
145
+ const fetchImpl = deps.fetchImpl ?? globalThis.fetch;
146
+ const controller = new AbortController();
147
+ const timer = setTimeout(() => controller.abort(), TELEMETRY_TIMEOUT_MS);
148
+ // Don't keep the event loop alive just for the timer.
149
+ if (typeof timer.unref === 'function')
150
+ timer.unref();
151
+ try {
152
+ await fetchImpl(url, {
153
+ method: 'POST',
154
+ headers: {
155
+ 'content-type': 'application/json',
156
+ 'x-api-key': config.apiKey,
157
+ 'user-agent': `testsprite-cli/${VERSION}`,
158
+ },
159
+ body: JSON.stringify(body),
160
+ signal: controller.signal,
161
+ });
162
+ }
163
+ finally {
164
+ clearTimeout(timer);
165
+ }
166
+ }
167
+ catch {
168
+ // Best-effort: telemetry must never affect the command.
169
+ }
170
+ }
171
+ //# sourceMappingURL=telemetry.js.map
@@ -0,0 +1,14 @@
1
+ export interface TextTableColumn<T> {
2
+ header: string;
3
+ width: number | ((rows: readonly T[]) => number);
4
+ render: (row: T) => string;
5
+ }
6
+ export interface TextTableOptions {
7
+ columns?: string;
8
+ noHeader?: boolean;
9
+ separator?: boolean;
10
+ }
11
+ export declare function renderTextTable<T>(rows: readonly T[], columns: readonly TextTableColumn<T>[], options?: TextTableOptions): string;
12
+ export declare function resolveTextColumns<T>(raw: string | undefined, columns: readonly TextTableColumn<T>[]): readonly TextTableColumn<T>[];
13
+ export declare function measureTextColumns<T>(rows: readonly T[], columns: readonly TextTableColumn<T>[]): number[];
14
+ export declare function formatTextTableRow(values: readonly string[], widths: readonly number[]): string;
@@ -0,0 +1,45 @@
1
+ import { localValidationError } from './errors.js';
2
+ export function renderTextTable(rows, columns, options = {}) {
3
+ const selected = resolveTextColumns(options.columns, columns);
4
+ const widths = measureTextColumns(rows, selected);
5
+ const body = rows.map(row => formatTextTableRow(selected.map(column => column.render(row)), widths));
6
+ if (options.noHeader === true)
7
+ return body.join('\n');
8
+ const header = formatTextTableRow(selected.map(column => column.header), widths);
9
+ return [header, ...(options.separator === true ? ['-'.repeat(header.length)] : []), ...body].join('\n');
10
+ }
11
+ export function resolveTextColumns(raw, columns) {
12
+ if (raw === undefined || raw.trim() === '')
13
+ return columns;
14
+ const byKey = new Map(columns.map(column => [textColumnKey(column.header), column]));
15
+ const validKeys = columns.map(column => textColumnKey(column.header));
16
+ const requested = raw.split(',').map(token => token.trim());
17
+ if (requested.some(token => token.length === 0)) {
18
+ throw localValidationError('columns', `must be a comma-separated list of: ${validKeys.join(', ')}`, validKeys);
19
+ }
20
+ return requested.map(token => {
21
+ const key = textColumnKey(token);
22
+ const column = byKey.get(key);
23
+ if (column === undefined) {
24
+ throw localValidationError('columns', `unknown column "${token}"; must be one of: ${validKeys.join(', ')}`, validKeys);
25
+ }
26
+ return column;
27
+ });
28
+ }
29
+ export function measureTextColumns(rows, columns) {
30
+ return columns.map(column => typeof column.width === 'function' ? column.width(rows) : column.width);
31
+ }
32
+ export function formatTextTableRow(values, widths) {
33
+ return values
34
+ .map((value, index) => (index === values.length - 1 ? value : pad(value, widths[index] ?? 0)))
35
+ .join(' ');
36
+ }
37
+ function textColumnKey(value) {
38
+ return value.toLowerCase().replace(/[^a-z0-9]/g, '');
39
+ }
40
+ function pad(value, width) {
41
+ if (value.length >= width)
42
+ return value;
43
+ return value + ' '.repeat(width - value.length);
44
+ }
45
+ //# sourceMappingURL=text-table.js.map
@@ -7,7 +7,16 @@
7
7
  */
8
8
  /** One-word routing label for the text card. */
9
9
  export declare function routingLabel(v3Enabled: boolean): 'v3' | 'v2';
10
- /** Consolidated advisory (stderr) emitted when V3 routing is on. */
10
+ /**
11
+ * Consolidated advisory (stderr) emitted when V3 routing is on.
12
+ *
13
+ * Only genuinely-open gaps belong here. Two originally-listed items have
14
+ * shipped and were removed: `test cancel` works on V3 runs, and `test delete`
15
+ * mirrors into Postgres instead of leaving a runnable, billable row behind.
16
+ * An advisory that warns about fixed behavior is worse than none — it teaches
17
+ * users to distrust the whole block, and it sends them chasing a failure that
18
+ * cannot happen.
19
+ */
11
20
  export declare const V3_ROUTING_ADVISORY: string[];
12
21
  /** Write the advisory to a stderr sink, one line per call. */
13
22
  export declare function emitV3RoutingAdvisory(stderr: (line: string) => void): void;
@@ -9,12 +9,20 @@
9
9
  export function routingLabel(v3Enabled) {
10
10
  return v3Enabled ? 'v3' : 'v2';
11
11
  }
12
- /** Consolidated advisory (stderr) emitted when V3 routing is on. */
12
+ /**
13
+ * Consolidated advisory (stderr) emitted when V3 routing is on.
14
+ *
15
+ * Only genuinely-open gaps belong here. Two originally-listed items have
16
+ * shipped and were removed: `test cancel` works on V3 runs, and `test delete`
17
+ * mirrors into Postgres instead of leaving a runnable, billable row behind.
18
+ * An advisory that warns about fixed behavior is worse than none — it teaches
19
+ * users to distrust the whole block, and it sends them chasing a failure that
20
+ * cannot happen.
21
+ */
13
22
  export const V3_ROUTING_ADVISORY = [
14
23
  '[advisory] V3 routing is on for this account. While these gaps are open:',
15
- ' - `test cancel` may return 404',
16
- ' - `test delete` may leave a zombie run',
17
- ' - `--target-url` is ignored on frontend runs',
24
+ ' - `--target-url` is ignored on frontend runs (the run uses the project environment)',
25
+ ' - a frontend rerun replays the run it was pointed at, not necessarily the latest saved code',
18
26
  ];
19
27
  /** Write the advisory to a stderr sink, one line per call. */
20
28
  export function emitV3RoutingAdvisory(stderr) {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.4.0";
1
+ export declare const VERSION = "0.5.0";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // AUTO-GENERATED by scripts/generate-version.mjs — do not edit by hand.
2
2
  // Run `npm run build` (or `npm run generate:version`) to regenerate.
3
- export const VERSION = '0.4.0';
3
+ export const VERSION = '0.5.0';
4
4
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testsprite/testsprite-cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Official TestSprite command-line interface",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "skills",
13
+ "schemas",
13
14
  "!dist/**/*.map"
14
15
  ],
15
16
  "scripts": {
@@ -44,7 +45,16 @@
44
45
  "testsprite",
45
46
  "cli",
46
47
  "testing",
47
- "automation"
48
+ "automation",
49
+ "test-automation",
50
+ "ai-testing",
51
+ "e2e",
52
+ "qa",
53
+ "api-testing",
54
+ "playwright",
55
+ "mcp",
56
+ "claude-code",
57
+ "agent"
48
58
  ],
49
59
  "author": "TestSprite team",
50
60
  "license": "Apache-2.0",
@@ -54,12 +64,13 @@
54
64
  "valibot": "^1.4.1"
55
65
  },
56
66
  "devDependencies": {
57
- "@eslint/js": "^9.14.0",
67
+ "@eslint/js": "^10.0.1",
58
68
  "@types/node": "^22.9.0",
59
69
  "@vitest/coverage-v8": "^2.1.4",
60
- "eslint": "^9.14.0",
70
+ "ajv": "^8.20.0",
71
+ "eslint": "^10.7.0",
61
72
  "eslint-config-prettier": "^9.1.0",
62
- "globals": "^15.12.0",
73
+ "globals": "^17.7.0",
63
74
  "msw": "^2.14.3",
64
75
  "prettier": "^3.3.3",
65
76
  "typescript": "^5.6.3",
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/TestSprite/testsprite-cli/main/schemas/plan.schema.json",
4
+ "title": "TestSprite CLI plan file",
5
+ "description": "Shape ingested by `testsprite test create --plan-from <file>` (and, per-line, by `test create-batch --plans <file.jsonl>` / `--plan-from-dir <dir>`). One plan file describes exactly ONE test — a top-level JSON array is rejected; use create-batch for many. This schema is the machine-readable ground truth for THIS command (`--plan-from`), not for `assertPlanShape`'s raw structural check in isolation — where the two diverge (see `type` below), this schema encodes what `--plan-from` actually accepts end-to-end. It is asserted in `src/lib/plan-schema.spec.ts` against the real validator; if the two ever disagree, the validator's actual acceptance behavior is authoritative and this file is out of date. Not enforced by this schema (checked separately by the CLI as a pre-flight guard, not a structural JSON constraint): a plan file must be <= 256 KB total.",
6
+ "type": "object",
7
+ "required": ["projectId", "type", "name", "planSteps"],
8
+ "properties": {
9
+ "$schema": {
10
+ "description": "Optional. Point your editor at this file (e.g. the raw URL in the plan template, or a local path to a copy shipped in node_modules/@testsprite/testsprite-cli/schemas/plan.schema.json) to get inline validation and completion while authoring. Ignored by the CLI — plan files are not restricted to a fixed property set (see `additionalProperties`, implicitly true throughout this schema), and this property is deliberately left type-unconstrained here to match: assertPlanShape does not inspect `$schema` at all, so a non-string value here is exactly as valid to the CLI as a string one."
11
+ },
12
+ "projectId": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "pattern": "\\S",
16
+ "description": "Project id returned by `testsprite project list`. Must be non-empty and not whitespace-only."
17
+ },
18
+ "type": {
19
+ "type": "string",
20
+ "enum": ["frontend"],
21
+ "description": "Restricted to `frontend` — `--plan-from` rejects a `backend`-typed plan pre-flight with a `nextAction` pointing at `test create --type backend --code-file <path>` (backend tests are authored from a code file, not a plan). `assertPlanShape`'s own structural check is looser (it accepts `backend` as a bare shape check before that later rejection), but this schema is the ground truth for the `--plan-from` COMMAND as a whole, not for the isolated structural check — so it encodes the value that actually succeeds end-to-end."
22
+ },
23
+ "name": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "pattern": "\\S",
27
+ "description": "Human-readable test name. Write it as an assertable behavior statement (subject + verb + outcome), not a noun fragment."
28
+ },
29
+ "description": {
30
+ "type": "string",
31
+ "description": "Optional one-sentence elaboration of `name` — the condition plus the expected outcome. Any string is accepted (including empty), unlike `name`/`projectId`."
32
+ },
33
+ "priority": {
34
+ "type": "string",
35
+ "enum": ["p0", "p1", "p2", "p3"],
36
+ "description": "Optional. p0 = must-pass, p1 = important paths, p2 = edge cases, p3 = cosmetic."
37
+ },
38
+ "planSteps": {
39
+ "type": "array",
40
+ "minItems": 1,
41
+ "maxItems": 200,
42
+ "description": "1-200 steps describing user intent in plain language, not selectors. `{{...}}`-style placeholders are NOT substituted by the CLI — a step containing one is structurally valid (passes this schema and assertPlanShape) but triggers a non-fatal `[advisory]` at `test create --plan-from` time; store login credentials on the project instead (`project update --username/--password`, or Portal -> Project Settings).",
43
+ "items": {
44
+ "type": "object",
45
+ "required": ["type", "description"],
46
+ "properties": {
47
+ "type": {
48
+ "type": "string",
49
+ "enum": ["action", "assertion"]
50
+ },
51
+ "description": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "pattern": "\\S",
55
+ "description": "One verb per step. Describe the outcome/intent, not a CSS selector or literal button label."
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
@@ -22,11 +22,11 @@ unverified-because-undeployed and stop. If the user explicitly named a tool
22
22
 
23
23
  ```bash
24
24
  testsprite --version # CLI installed?
25
- testsprite auth whoami # credentials valid?
25
+ testsprite auth status # credentials valid?
26
26
  ```
27
27
 
28
28
  If `--version` fails, tell the user to install the CLI and stop.
29
- If `auth whoami` fails, tell the user to run `testsprite auth configure` and stop.
29
+ If `auth status` fails, tell the user to run `testsprite setup` and stop.
30
30
 
31
31
  ### 2. Find the project
32
32
 
@@ -67,13 +67,13 @@ because <X>. Treat this as unverified until that's resolved." Don't claim done.
67
67
 
68
68
  ```bash
69
69
  testsprite --version # CLI installed?
70
- testsprite auth whoami # credentials configured?
70
+ testsprite auth status # credentials configured?
71
71
  ```
72
72
 
73
73
  - `--version` fails → the CLI isn't installed. Tell the user to install the
74
74
  TestSprite CLI (see the TestSprite docs) and stop; don't install it for them.
75
- - `auth whoami` fails → no credentials. Tell the user they can run
76
- `testsprite auth configure`, then stop.
75
+ - `auth status` fails → no credentials. Tell the user they can run
76
+ `testsprite setup`, then stop.
77
77
 
78
78
  ## 2. Find the project
79
79