Authenticate the CLI with your Basecut account using the OAuth2 device authorization flow. This will open a browser window for you to sign in. Once complete, your credentials are saved to a local profile.
basecut login requires an interactive terminal to open the browser and poll
for the authentication token.
Usage
Flags
Optional
| Flag | Default | Description |
|---|
--profile <name> | default | The name of the local profile to save credentials under. |
Examples
Quick Start
# Standard interactive login
basecut login
# Login and save to a specific profile
basecut login --profile production
Standard Interactive Login
Most common usage to get started:
What happens:
- The CLI generates a unique device code.
- It attempts to open your default web browser to the Basecut login page.
- You sign in via the browser.
- The CLI polls the API until the authorization is confirmed.
- Success credentials are stored in
~/.basecut/credentials.
Machine-to-Machine / Headless Login
For environments without a browser (like SSH sessions), Basecut will print a URL for you to copy-paste:
If a browser can’t be opened, you’ll see:
Please visit: https://basecut.dev/auth/device
And enter code: ABCD-1234
Environment Variables
| Variable | Description |
|---|
BASECUT_NO_BROWSER | Set to true to skip attempting to open the browser automatically. |
Success Output
✓ Authenticating...
✓ Browser opened to https://basecut.dev/auth/device
✓ Authenticated as jake@example.com
✓ Credentials saved to profile: default
Next Steps