envshed login
Authenticate with Envshed.
Usage
envshed login [--token <token>] [--api-url <url>]
Options
| Flag | Description |
|---|---|
-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:
- Opens your browser to the Envshed authorization page
- Displays a device code in the terminal
- Polls until you approve the authorization in the browser
- 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