Skip to content

lb login

Terminal window
lb login [options]

lb login opens your default browser to the LoomBrain dashboard login page. After you complete authentication, the dashboard redirects to a local callback server, and the CLI stores credentials in ~/.config/loombrain/config.json.

The flow times out after 5 minutes if no callback is received.

OptionTypeDefaultDescription
--api-url <url>stringhttps://api.loombrain.comOverride the API base URL.
--dashboard-url <url>stringhttps://app.loombrain.comOverride the dashboard URL used for the OAuth redirect.
--non-interactiveflagForce non-interactive mode. Prints instructions for API key auth and exits.

When a browser cannot be opened, lb login detects the environment and exits with an error. Non-interactive mode is triggered by any of the following:

SignalMeaning
SSH_CONNECTION setRunning over SSH
SSH_CLIENT setRunning over SSH (older clients)
SSH_TTY setSSH with a TTY allocated
CI=true setRunning in CI
LB_NON_INTERACTIVE=1 setExplicitly forced

In non-interactive environments, use an API key instead:

Terminal window
export LB_TOKEN=lbk_...

Generate API keys in the LoomBrain dashboard under Settings → API Keys. See Authentication for full details.

Standard login (opens browser):

Terminal window
lb login

Login against a self-hosted or staging API:

Terminal window
lb login --api-url https://api.staging.loombrain.com --dashboard-url https://app.staging.loombrain.com

Force non-interactive mode to confirm the environment is detected correctly:

Terminal window
lb login --non-interactive