Use API keys when automation can’t complete a browser login. They authenticate with bearer auth, skip CSRF checks, and carry explicit scopes — so each job gets exactly the access it needs and nothing more.
Create a key
If you omit --scopes, the CLI defaults to:
The raw secret is shown once, at creation. Store it in your secret manager immediately — never commit it.
Use a key
Provide the token through an environment variable, or pipe it in over stdin to keep it off the process list.
Run non-interactively
Set AGENT_ARTIFACTS_NO_INPUT=1 (or pass --no-input) so jobs fail fast instead of trying to open a browser:
Manage keys
REST equivalents:
Available scopes
Example: publish a report from CI
Stay safe
- Give each automation its own key.
- Use the smallest scope set that completes the job.
- Prefer environment variables or stdin over flags on shared hosts.
- Revoke keys the moment a job or agent is retired.
- Use
--dry-run to preview mutating CLI calls while building a pipeline.