Device Code Login
The simplest way to authenticate. Opens your browser to authorize the CLI:AB12-CDEF, prompts you to press Enter to open your browser, and waits for you to authorize. Once authorized, your API key is saved to ~/.danube/config.json.
Log in for an Organization
Pass--org with the organization’s id or slug and the key the device flow mints belongs to that organization instead of to you:
danube-org-id header: its internal tools are searchable, its shared credentials apply, its rate and spend caps count the calls, and its audit log records them. An owner or admin of the organization sees the key on the organization’s tab of the API Keys page and can revoke it. --org applies to the device flow only; a key saved with --api-key already belongs to an organization. See Organizations.
API Key Login
If you already have an API key (e.g. from the dashboard), save it directly:Environment Variable
SetDANUBE_API_KEY to skip the config file entirely. Ideal for CI/CD:
Per-Command Override
Pass--api-key on any command:
Config File
The CLI stores credentials in~/.danube/config.json (permissions 600):
Named Profiles
Use profiles for multiple accounts:Priority Order
API key is resolved in this order:--api-keyflag (highest)DANUBE_API_KEYenvironment variable- Config file (
~/.danube/config.json)
Commands
Troubleshooting
'No API key found' error
'No API key found' error
Run
danube login to authenticate, or set DANUBE_API_KEY environment variable.Browser doesn't open during login
Browser doesn't open during login
Copy the verification URL from the terminal output and open it manually.
Login times out
Login times out
The device code expires after 10 minutes. Run
danube login again to get a new code.'This device asked to join an organization you are not a member of'
'This device asked to join an organization you are not a member of'
The browser session that entered the code belongs to an account outside the organization named by
--org. Sign in as a member and enter the code again, or run danube login without --org.'Organization not found' with --org
'Organization not found' with --org
The id or slug matches no organization. The slug is the one in the dashboard’s organization URL;
danube login --org takes either form.