Authentication
The CLI needs an API token to communicate with Envshed. There are two ways to authenticate.
Device authorization (recommended)
Run the login command and follow the browser flow:
envshed login
This will:
- Open your browser to the Envshed authorization page
- Ask you to approve the CLI access
- Automatically save the token to
~/.envshed/config.json
If you're not logged into Envshed in the browser, you'll be redirected to sign in first, then brought back to the authorization page.
Custom API URL
If you're running Envshed locally or on a custom domain:
envshed login --api-url http://localhost:3000
Token-based login
If you already have an API token (created in the web dashboard under Settings > API Tokens):
envshed login --token envshed_your_token_here
Verify authentication
Check who you're logged in as:
envshed whoami
Managing tokens
envshed token show # Show current token (masked)
envshed token clear # Remove saved token
envshed token set <t> # Set a new token directly