Skip to main content
In CI, authenticate with STAPLEHIRE_KEY (never browser login), install the CLI, and rely on JSON output with stable exit codes for assertions.
Do not run staplehire login in CI — it opens a browser and waits for an interactive callback. Always provide STAPLEHIRE_KEY as a secret.

Set up the key

Create an API key in Settings → Developers and store it as a CI secret named STAPLEHIRE_KEY. Then verify it in the pipeline:

CI examples

Environment variables

Clean JSON output

Use -q (or pipe stdout) so scripts get JSON without human status lines. jq -e makes assertions fail the job when a field is missing.

Common errors

FAQ

No. login opens a browser. Set STAPLEHIRE_KEY as a secret instead.
Use -q for JSON-only output that also suppresses human status lines. Output is already JSON when stdout is piped, but -q guarantees it in any context.
Yes — if the key has permission and the command includes every required flag.
Related: Authentication · Use with AI agents · Command reference