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 logoutClear saved credentials
devhelm auth meShow current user and organization
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.
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

Clear the active context’s saved credentials.
devhelm auth logout

auth me

Show the authenticated user’s details and current organization.
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-current / --no-set-currentbooleantrueWhether to switch to this context immediately

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.