auth command. Authenticate via OAuth, manage API keys, and verify authentication status.
Command Syntax
Subcommands
login
Authenticate with HopX via browser OAuth.
Syntax:
--provider TEXT- OAuth provider:GoogleOAuth,GitHubOAuth(default:GoogleOAuth)--no-browser- Headless mode: manually paste callback URL (for servers without browsers)
0- Success1- Authentication failed5- Timeout
logout
Log out and clear stored credentials.
Syntax:
0- Success
status
Check authentication status.
Syntax:
0- Authenticated3- Not authenticated
validate
Validate current API key.
Syntax:
0- Valid3- Invalid or missing
refresh
Refresh OAuth token.
Syntax:
0- Success3- Authentication error
keys
Manage API keys.
keys list
List all API keys.
Syntax:
keys create
Create a new API key.
Syntax:
--name TEXT- API key name (auto-generated if not provided)
0- Success3- Authentication error
keys revoke
Revoke an API key.
Syntax:
KEY_ID- API key ID to revoke (required)
0- Success3- Authentication error4- Key not found
keys info
Get information about an API key.
Syntax:
KEY_ID- API key ID (required)
Authentication Methods
Method 1: OAuth Login (Recommended)
Method 2: Environment Variable
Method 3: Config File
API keys are automatically stored in~/.hopx/credentials.yaml after creation.
Shell Scripting Examples
Check Authentication Before Running Commands
Create and Use API Key
Related
- CLI Quickstart - Get started with CLI authentication
- CLI Installation - Installation guide
- API Key Guide - Complete API key documentation
- Configuration - Configure CLI settings
Next Steps
- Complete CLI Quickstart to authenticate and create your first sandbox
- Learn about Configuration to manage multiple profiles
- Review API Key Guide for security best practices

