Skip to content

raindrop auth

Overview

The raindrop auth command manages your authentication with the LiquidMetal platform. You can authenticate through a browser-based flow, manage multiple organization accounts, and switch between them.

Authentication stores a bearer token for each organization you log into. The CLI tracks which organization is currently active and uses that token for all subsequent commands. You can authenticate with multiple organizations and switch between them as needed.

All authentication state is stored locally on your machine. Logging out removes the stored token for the current organization.

Basic Usage

Start by logging into your LiquidMetal organization:

Terminal window
raindrop auth login

This opens your browser and displays a QR code in the terminal. Complete the authentication flow in your browser. The CLI stores your credentials and sets this organization as active.

List all authenticated organizations:

Terminal window
raindrop auth list

Switch between organizations:

Terminal window
raindrop auth select

Command Syntax

Terminal window
raindrop auth <command> [options]

Available Commands:

  • login - Authenticate with a new organization
  • logout - Remove authentication for the current organization
  • list - Display all authenticated organizations
  • select - Change the active organization

raindrop auth login

Authenticate with a LiquidMetal organization using browser-based authentication. This command opens your default browser and displays a QR code in the terminal.

Implementation: packages/raindrop/src/commands/auth/login.ts

Syntax

Terminal window
raindrop auth login

Behavior

The command performs these steps:

  1. Generates an authentication URL and QR code
  2. Opens the URL in your default browser
  3. Displays the QR code in the terminal
  4. Waits for you to complete authentication in the browser
  5. Stores the bearer token locally
  6. Sets the organization as your active organization

Output

Terminal window
[QR code displayed in terminal]
Scan the QR code or, using a browser visit: https://liquidmetal.run/auth/device/...
opening url...
Waiting for session...
Logged in as user@company.com to Acme Corp

Error Cases

Authentication timeout:

Terminal window
failed to authenticate in time

Exit code: 1

raindrop auth logout

Remove the authentication token for your currently active organization. This command clears the stored credentials and unsets the active organization.

Implementation: packages/raindrop/src/commands/auth/logout.ts

Syntax

Terminal window
raindrop auth logout

Behavior

The command removes the bearer token for the current organization from local storage. It also clears the current organization setting. You must log in again to use CLI commands that require authentication.

raindrop auth list

Display all organizations you have authenticated with. Shows organization IDs, names, user emails, and which organization is currently active.

Implementation: packages/raindrop/src/commands/auth/list.ts

Syntax

Terminal window
raindrop auth list [--output <format>]

Options

FlagDescriptionValuesDefault
-o, --outputOutput formattext, table, jsontable

Output Formats

Table format (default):

Terminal window
┌─────────────────┬────────────────────────┬──────────────────┬────────────┐
(index) │ organizationName │ userEmail │ isSelected │
├─────────────────┼────────────────────────┼──────────────────┼────────────┤
org_01ABC123XYZ 'Acme Corp' 'user@company.com' false
org_01DEF456UVW 'Development Team' 'user@company.com' false
org_01GHI789RST 'Production Environment' 'user@company.com' true
└─────────────────┴────────────────────────┴──────────────────┴────────────┘

Text format:

Terminal window
org_01ABC123XYZ - user@company.com Acme Corp
org_01DEF456UVW - user@company.com Development Team
org_01GHI789RST (current) - user@company.com Production Environment

JSON format:

[
{
"organizationId": "org_01ABC123XYZ",
"organizationName": "Acme Corp",
"userEmail": "user@company.com",
"isSelected": false
},
{
"organizationId": "org_01DEF456UVW",
"organizationName": "Development Team",
"userEmail": "user@company.com",
"isSelected": false
},
{
"organizationId": "org_01GHI789RST",
"organizationName": "Production Environment",
"userEmail": "user@company.com",
"isSelected": true
}
]

raindrop auth select

Change which organization is currently active. All subsequent CLI commands use the selected organization’s credentials.

Implementation: packages/raindrop/src/commands/auth/select.ts

Syntax

Terminal window
raindrop auth select [--organizationId <value>]

Options

FlagDescriptionRequired
--organizationIdID of the organization to selectNo

Behavior

Without the organizationId flag:

The command displays an interactive prompt listing all authenticated organizations. Select one using arrow keys and press Enter.

With the organizationId flag:

The command immediately switches to the specified organization without showing a prompt.

Error Cases

No authenticated organizations:

Terminal window
no organizations are authorized. see raindrop auth login.

Exit code: 2

Invalid organization ID:

Terminal window
org_INVALID123 not authenticated

Exit code: 2

Examples

First-time setup

Log into your organization for the first time:

Terminal window
raindrop auth login

The browser opens automatically. Complete the authentication flow. The CLI confirms your login:

Terminal window
Logged in as user@company.com to Acme Corp

Working with multiple organizations

You work with both a development and production organization. Log into both:

Terminal window
# Log into development organization
raindrop auth login
# Complete authentication in browser
Logged in as user@company.com to Development Team
# Log into production organization
raindrop auth login
# Complete authentication in browser
Logged in as user@company.com Production Environment

View all authenticated organizations:

Terminal window
raindrop auth list --output text
Terminal window
org_01ABC123XYZ - user@company.com Acme Corp
org_01DEF456UVW - user@company.com Development Team
org_01GHI789RST (current) - user@company.com Production Environment

Switch to your development organization using the interactive prompt:

Terminal window
raindrop auth select

Or specify the organization ID directly:

Terminal window
raindrop auth select --organizationId org_01DEF456UVW

Exit Codes

CodeDescription
0Command completed successfully
1Authentication timeout or manifest errors
2Invalid arguments or organization not found