All workAndrew Cates.

Project 68 of 84

Sauce Labs CLI

Unofficial TypeScript command line client (`sauce`) for the Sauce Labs App Storage and Jobs REST APIs, so mobile teams can upload/manage .ipa/.apk app files and list, inspect and annotate test jobs from a shell script or CI job instead of hand-rolled curl calls.

Status
Shipped
Area
Developer Tooling & CLIs
Last activity
2026
Stack
  • TypeScript
  • Node.js
  • commander
  • dotenv
  • js-yaml
  • Vitest
  • ESLint
  • Prettier

Highlights

  1. Added a retry layer to a TypeScript Sauce Labs API client: per-attempt timeouts, equal-jitter exponential backoff, Retry-After parsing with a cap, and a 'safe' default that retries uploads only on connect errors or 429, because an upload that reached the server may already be applied; fixed all 5 findings from an independent review before merge (266 tests passing).
  2. Found and fixed three bugs by checking the sauce-labs-cli CLI against the real Sauce Labs API: an advertised region whose host does not resolve (us-east-1, replaced with us-east-4), real-device time filters that were silently dropped, and errors raised inside commands that exited 1 with no message.
  3. Built and deployed a public Next.js 16 product site for the CLI (sauce-labs-cli-site.catesworks.dev) with 14 per-command reference pages, guarded by a test that fails when a page drifts from the commander source; deployed through a manual, prebuilt Vercel workflow on a self-hosted release runner.
  4. Hardened the release path: Changesets plus npm OIDC Trusted Publishing in place of a long-lived NPM_TOKEN, lint/typecheck/test run inside the release job because the bot-opened Version PR triggers no CI, noEmitOnError builds, and a RELEASING.md that names the remaining npmjs.com and repo-visibility steps.
  5. Moved the CLI onto the org's shared standards (pnpm 11, @cogs ESLint/Prettier configs with type-aware lint, Node 24, self-hosted ci-runners), and wrote a CODING_STANDARDS.md and domain GLOSSARY.md derived from the real code, including an exit-code contract and a list of flagged naming ambiguities.
  6. Cut CI waste on the CLI: paused (not deleted) Linux/Windows binary legs that the macOS-only runner pool could not serve, ran CI on pull requests only once data showed push-to-main runs only repeated the required check, and removed a coverage upload that was hitting the Actions storage quota.