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:
- Request device code - CLI requests a code from SageOx
- Open browser - Authorization page opens automatically
- Authorize - Sign in and approve CLI access
- 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
| Flag | Description |
|---|---|
--endpoint | SageOx endpoint URL (overrides SAGEOX_ENDPOINT) |
ox logout
ox logout removes the local authentication token and logs you out of SageOx.
| Flag | Description |
|---|---|
--all | Log out from all endpoints |
--endpoint | Endpoint to log out from |
-f, --force | Skip 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
| Variable | Description |
|---|---|
SAGEOX_ENDPOINT | SageOx endpoint URL (--endpoint overrides it) |
SAGEOX_TOKEN | Personal Access Token for headless auth, see pats |
What's next
- Personal Access Tokens - Headless auth for CI and cloud agents
- Running ox in ephemeral environments - Claude Code Cloud, Devin, GitHub Actions
- ox doctor - Diagnose CLI issues
- ox init - Initialize a repository

