Skip to Content
New to Genbox? Check out our Getting Started guide

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

OptionDescription
--token <token>Use API token instead of browser auth
--no-browserDisplay URL instead of opening browser

Examples

Browser Authentication

gb login

Opens your default browser for authentication.

Token Authentication

gb login --token gx_abc123...

Useful for CI/CD environments.

No Browser Mode

gb login --no-browser

Displays URL to copy/paste manually.

Authentication Flow

  1. Initiate: CLI generates secure auth request
  2. Browser: Opens login page in default browser
  3. Authenticate: Sign in with email or OAuth
  4. Authorize: Grant CLI access to your account
  5. 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 environments

SSH Key Setup

During first login, Genbox:

  1. Generates an SSH key pair for you
  2. Registers the public key with your account
  3. Configures SSH for *.genbox.dev hosts

Logout

To log out and clear credentials:

rm -rf ~/.genbox

Notes

  • Tokens expire after 30 days of inactivity
  • Re-run gb login to refresh expired tokens
  • SSH keys persist until manually removed
  • Use --token for headless/CI environments

See Also

Last updated on