The CLI keeps per-host credentials inDocumentation Index
Fetch the complete documentation index at: https://docs.breadbox.sh/llms.txt
Use this file to discover all available pages before exploring further.
~/.config/breadbox/hosts.toml. Each entry has a name, a base URL, and an API key. You add hosts with breadbox auth login, switch with --host <name> or the BREADBOX_HOST env var, and drop credentials with breadbox auth logout.
The CLI talks to the unauthenticated device-code endpoints under the hood — the long-lived bb_ key is never copied across an untrusted channel.
Three ways to add a host
- Device-code (recommended)
- Paste mode (headless)
- auth bootstrap (local only)
Run The session is short-lived (~10 minutes). If the operator doesn’t approve in time, the CLI exits
breadbox auth login --host <URL> on the machine that needs the key. The CLI prints a short user code and a verification URL — the operator opens that URL on a trusted device (a laptop with the dashboard logged in), enters the code, approves, and the CLI saves the issued bb_ key. No secret crosses the untrusted machine.3 (auth error) and you can retry.Switching hosts
--host accepts either a configured name (production) or a bare URL (https://breadbox.example.com). With a bare URL, the CLI falls back to BREADBOX_TOKEN from the environment, since there’s no hosts.toml entry to read from.
Checking what you’re authenticated as
whoami calls GET /api/v1/keys/me and prints the actor type (user / agent / system), the actor name, the host, and the key scope.
Environment variable overrides
| Variable | Purpose |
|---|---|
BREADBOX_HOST | Default host name or base URL for every command. Overrides auth use. |
BREADBOX_TOKEN | API key to use when BREADBOX_HOST is a bare URL (no hosts.toml entry). |
hosts.toml.
Logging out
hosts.toml. It does not revoke the key on the server — if you need to invalidate the credential too, run breadbox keys revoke <id> against a host that still has access, or revoke from the admin dashboard.
File layout
hosts.toml is plaintext. Protect it with chmod 600 (the CLI does this automatically on first write) and treat it as a secret. On macOS the file lives at ~/Library/Application Support/breadbox/hosts.toml only when XDG_CONFIG_HOME is unset — the CLI follows the XDG base directory spec.
Next steps
Output formats
JSON, NDJSON, field selection, exit codes.
Headless deployment
Patterns for agent and CI environments.