Skip to main content
Manage CLI authentication. Log in interactively, switch between saved contexts, and inspect the current token.

Commands

CommandDescription
devhelm auth loginAuthenticate and save credentials
devhelm auth logoutRemove the active context
devhelm auth meShow API key identity, organization, plan, and rate limits
devhelm auth tokenDisplay the current API token
devhelm auth contextShow the active context
devhelm auth context create <name>Create a named context
devhelm auth context listList all contexts
devhelm auth context use <name>Switch to a context
devhelm auth context delete <name>Delete a context

auth login

Authenticate interactively and save credentials to ~/.devhelm/contexts.json. The token is validated against the API before saving — an invalid token exits with code 11 and saves nothing.
devhelm auth login
Skip the interactive prompt by passing the token directly:
devhelm auth login --token dh_live_xxxxxxxx --name production
FlagTypeDefaultDescription
--tokenstringAPI token (skips interactive prompt)
--namestringdefaultContext name to save under

auth logout

Remove the active context from ~/.devhelm/contexts.json. If other contexts remain, the first one becomes active.
devhelm auth logout

auth me

Show the API key identity, organization, plan tier, rate limits, and usage counters for the resolved token.
devhelm auth me
devhelm auth me -o json

auth token

Display the resolved API token. Useful for piping into other tools:
devhelm auth token
export TOKEN=$(devhelm auth token)
curl -H "Authorization: Bearer $TOKEN" https://api.devhelm.io/api/v1/monitors

auth context

Show active context

devhelm auth context

Create a context

devhelm auth context create staging \
  --token dh_live_xxxxxxxx \
  --api-url https://api.devhelm.io
FlagTypeDefaultDescription
--tokenstringAPI token (required)
--api-urlstringhttps://api.devhelm.ioAPI base URL for this context
--set-currentbooleantrueSwitch to this context immediately (always on — there is currently no --no-set-current variant; use auth context use to switch back)

List contexts

devhelm auth context list
The active context is marked with *.

Switch context

devhelm auth context use production

Delete a context

devhelm auth context delete staging

Next steps

CLI authentication guide

Token resolution order and best practices.

API keys

Create and manage API keys.