UseDocumentation Index
Fetch the complete documentation index at: https://staplehire.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
staplehire login for local development, or set STAPLEHIRE_KEY for agents, scripts, and CI.
Quickstart
login opens your browser, completes PKCE OAuth, validates the key, and writes STAPLEHIRE_KEY to .env in the current directory.
API key priority
The CLI resolves your API key in this order.| Priority | Source | Example |
|---|---|---|
| 1 | --api-key flag | staplehire --api-key sh_live_xxx roles list |
| 2 | STAPLEHIRE_KEY env var | export STAPLEHIRE_KEY=sh_live_xxx |
| 3 | .env in cwd | Written by staplehire login |
Use an API key in CI
Do not run browser login in automation. Create an API key in Staplehire settings and expose it asSTAPLEHIRE_KEY.
Log out
Common errors
| Error | Fix |
|---|---|
AuthenticationError | Run staplehire login or set STAPLEHIRE_KEY |
PermissionError | Confirm the key belongs to the right organization |
ValidationError | Check the command flags and field names |
FAQ
Where does staplehire login store credentials?
It writes STAPLEHIRE_KEY to .env in the current directory.
Can I pass an API key for one command?
Yes. Use--api-key before the subcommand.
Is staplehire init still supported?
Yes, but it is a deprecated alias for staplehire login.
Related: Install the Staplehire CLI · Use the Staplehire CLI in CI · CLI errors