gb login
Authenticate with Genbox.
Synopsis
gb login [options]Description
Authenticates your CLI with your Genbox account. Opens a browser for secure OAuth authentication and stores credentials locally.
Options
| Option | Description |
|---|---|
--token <token> | Use API token instead of browser auth |
--no-browser | Display URL instead of opening browser |
Examples
Browser Authentication
gb loginOpens your default browser for authentication.
Token Authentication
gb login --token gx_abc123...Useful for CI/CD environments.
No Browser Mode
gb login --no-browserDisplays URL to copy/paste manually.
Authentication Flow
- Initiate: CLI generates secure auth request
- Browser: Opens login page in default browser
- Authenticate: Sign in with email or OAuth
- Authorize: Grant CLI access to your account
- Complete: Credentials stored locally
Output
Opening browser for authentication...
✓ Logged in as alice@example.com
Account: alice@example.com
Plan: Pro
Balance: 1,250 credits
SSH key: ~/.ssh/genbox_ed25519 (configured)
You're ready to create environments!
Run 'gb create' to get started.Credentials Storage
Credentials are stored in ~/.genbox/config.json:
~/.genbox/
├── config.json # Auth tokens and preferences
└── genbox_ed25519 # SSH key for environmentsSSH Key Setup
During first login, Genbox:
- Generates an SSH key pair for you
- Registers the public key with your account
- Configures SSH for
*.genbox.devhosts
Logout
To log out and clear credentials:
rm -rf ~/.genboxNotes
- Tokens expire after 30 days of inactivity
- Re-run
gb loginto refresh expired tokens - SSH keys persist until manually removed
- Use
--tokenfor headless/CI environments
See Also
gb balance- Check credit balancegb doctor- Diagnose auth issuesgb create- Create environment
Last updated on