chainabit auth login
Authenticate with your Chainabit account. Omit flags for browser login.
Synopsis
chainabit auth login [options]Options
| Option | Description | Default |
|---|---|---|
--email <email> | Email address (alias for --identifier) | — |
--identifier <identifier> | Username or email (skips prompt) | — |
--password-stdin | Read password from stdin | — |
--password-env <envVar> | Read password from an environment variable | — |
--password-file <path> | Read password from a file | — |
--api-key | Sign in with a Chainabit API key, entered hidden in a terminal or read from stdin; your Subscription sign-in stays saved | — |
--token-stdin | Read a Chainabit API key from stdin | — |
--token-env <envVar> | Read a Chainabit API key from an environment variable | — |
--token-file <path> | Read a Chainabit API key from a file | — |
--device | Use browser-based device authorization flow | — |
--browser | Alias for --device | — |
--no-open | Do not auto-open the browser when using device flow | Setting without flag: true; with flag: false |
Options shared by every command are described in Global options and shared behavior.
Behavior
With no credential flags, starts browser device approval and waits for the approved session before saving credentials. Password login and developer-token login use the explicitly selected secret input; browser/device aliases select the same device flow.
After a successful login, the CLI saves the API address it signed in against, and that address becomes the default for later commands until the next login or an override with --api-url or CHAINABIT_BASE_URL. Signing in clears the saved default workspace, so run chainabit workspace use again afterwards. Saved credentials belong to the API address they were created on and are not sent to a different one.
Validation
Choose only one input source per secret: stdin, environment variable or file. Do not mix password and token authentication or add credentials to an explicitly selected device flow. An environment source must exist, a file must be non-empty, and stdin must be piped. Non-interactive password login needs both an identifier/email and a password source. The device flow can require approval in an authenticated browser; JSON suppresses the human URL/code panel, so prefer human output for browser onboarding.
Authentication and permissions
An existing CLI login is not required. You supply an account credential or approve device login in the browser; registration creates a new identity. Authentication mode, MFA and server policy determine which flow is allowed.
Examples
chainabit auth login --device