login
Preview
This feature is in preview and is subject to change.
Authenticate through an OAuth device flow. Use --headless on a machine with
no browser, or set MOTHERDUCK_TOKEN.
The token is saved to ${MOTHERDUCK_HOME:-~/.motherduck}/credentials.json, so
you sign in once per machine.
Usage
motherduck login [options]
Options
| Option | Description |
|---|---|
--headless | Start the OAuth device flow, print the device code, and return without polling |
--device-code <code> | Resume a pending headless OAuth device flow from the displayed code |
--headless and --device-code are mutually exclusive: the first starts a
flow, the second finishes by sending the code.
login has no formatted output, so it doesn't take -o, --output.
Examples
Sign in through the browser:
motherduck login
Sign in on a machine with no browser. The first command prints a code, which you open on any other device; the second completes the flow:
motherduck login --headless
motherduck login --device-code <code>
Related
logoutremoves the saved tokenstatusconfirms which credential is in usenewcreates an account instead of signing in to one- Authentication