Skip to content

Commit 759e85c

Browse files
mo01115285816-cyberMOAAMN SAYED
andauthored
docs(usage): add --debug example + exit codes to help text (#171)
The 'testsprite usage' command help text listed three examples but omitted the --debug flag (a global option useful for diagnosing auth and network issues). It also didn't document the exit codes, which matters for CI/CD scripts that gate on the return value. This PR adds: - A --debug example showing what it traces (HTTP method/path, request id, latency) — useful when debugging 'auth error' or 'transport failure' messages. - An explicit exit-codes section (0 success, 3 auth error, 10 network failure) so users scripting against the CLI know what to expect. Pure documentation improvement — no behavioral change, no new deps. Tested: existing unit tests pass (npm test). Co-authored-by: MOAAMN SAYED <moaamnsayed560@gmail.com>
1 parent 93c621c commit 759e85c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/commands/usage.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,12 @@ export function createUsageCommand(deps: UsageDeps = {}): Command {
200200
'\nExamples:\n' +
201201
' testsprite usage # show balance + plan\n' +
202202
' testsprite usage --output json # machine-readable balance\n' +
203+
' testsprite usage --debug # trace HTTP method/path, request id, latency\n' +
203204
' testsprite credits # alias for usage\n' +
205+
'\nExit codes:\n' +
206+
' 0 success (or --dry-run)\n' +
207+
' 3 auth error — run `testsprite setup` to configure credentials\n' +
208+
' 10 transport/network failure (UNAVAILABLE) — retry the command\n' +
204209
'\nNote: credit balance requires a backend update to /me. Until shipped,\n' +
205210
" check your portal's Billing page (/dashboard/settings/billing) for your balance.",
206211
)

0 commit comments

Comments
 (0)