Skip to main content
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

basecut login [flags]

Flags

Optional

FlagDefaultDescription
--profile <name>defaultThe 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:
basecut login
What happens:
  1. The CLI generates a unique device code.
  2. It attempts to open your default web browser to the Basecut login page.
  3. You sign in via the browser.
  4. The CLI polls the API until the authorization is confirmed.
  5. 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:
basecut login
If a browser can’t be opened, you’ll see:
Please visit: https://basecut.dev/auth/device
And enter code: ABCD-1234

Environment Variables

VariableDescription
BASECUT_NO_BROWSERSet 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