Documentation
CLICommands

ox login

Authenticate your CLI with the SageOx platform using device flow authorization.

Usage

terminal
$

For CI, cloud agents, or scripts: use a Personal Access Token instead of interactive login. See Personal Access Tokens.

How it works

The ox login command uses OAuth 2.0 device flow:

  1. Request device code - CLI requests a code from SageOx
  2. Open browser - Authorization page opens automatically
  3. Authorize - Sign in and approve CLI access
  4. Complete - CLI receives and stores credentials

This is secure because your password never enters the terminal.

Credential storage

ox stores the authentication token locally, and ox logout removes it. Run ox status to see SageOx directory locations.

Commands

terminal
# Check authentication status
$
# Remove stored credentials
$
# Log out from every endpoint without a prompt
$

Flags

ox login

FlagDescription
--endpointSageOx endpoint URL (overrides SAGEOX_ENDPOINT)

ox logout

ox logout removes the local authentication token and logs you out of SageOx.

FlagDescription
--allLog out from all endpoints
--endpointEndpoint to log out from
-f, --forceSkip the confirmation prompt (for scripting)

Troubleshooting

Browser does not open - Copy the displayed URL manually.

Authentication timeout - Device code expires after 15 minutes. Run ox login again.

Wrong account - Run ox logout then ox login.

Environment variables

VariableDescription
SAGEOX_ENDPOINTSageOx endpoint URL (--endpoint overrides it)
SAGEOX_TOKENPersonal Access Token for headless auth, see pats

What's next