Skip to main content

envshed login

Authenticate with Envshed.

Usage

envshed login [--token <token>] [--api-url <url>]

Options

FlagDescription
-t, --token <token>Login with an existing API token
--api-url <url>API URL (overrides config)

Device authorization flow

Without --token, the CLI starts a device authorization flow:

  1. Opens your browser to the Envshed authorization page
  2. Displays a device code in the terminal
  3. Polls until you approve the authorization in the browser
  4. Saves the token to ~/.envshed/config.json
envshed login

If you're not already logged into Envshed in the browser, you'll be redirected to sign in first, then brought back to authorize the CLI.

The authorization times out after 10 minutes.

Token login

If you have an API token, you can skip the browser flow:

envshed login --token envshed_abc123...

Examples

# Interactive browser flow
envshed login

# Direct token login
envshed login --token envshed_abc123def456

# Login against a local dev server
envshed login --api-url http://localhost:3000