CLI
ox login
Authenticate your CLI with the SageOx platform using device flow authorization.
Usage
terminal
$
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
| OS | Location |
|---|---|
| macOS/Linux | ~/.config/sageox/credentials.json |
| Windows | %APPDATA%\sageox\credentials.json |
Commands
terminal
# Check authentication status
$
# Remove stored credentials
$
# Re-authenticate (switch accounts)
$
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_API_URL | Override API endpoint |
SAGEOX_NO_BROWSER | Set to 1 to disable automatic browser |

