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:
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:
raindrop auth list
Switch between organizations:
raindrop auth select
Command Syntax
raindrop auth <command> [options]
Available Commands:
login
- Authenticate with a new organizationlogout
- Remove authentication for the current organizationlist
- Display all authenticated organizationsselect
- 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
raindrop auth login
Behavior
The command performs these steps:
- Generates an authentication URL and QR code
- Opens the URL in your default browser
- Displays the QR code in the terminal
- Waits for you to complete authentication in the browser
- Stores the bearer token locally
- Sets the organization as your active organization
Output
[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:
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
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
raindrop auth list [--output <format>]
Options
Flag | Description | Values | Default |
---|---|---|---|
-o, --output | Output format | text , table , json | table |
Output Formats
Table format (default):
┌─────────────────┬────────────────────────┬──────────────────┬────────────┐│ (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:
org_01ABC123XYZ - user@company.com Acme Corporg_01DEF456UVW - user@company.com Development Teamorg_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
raindrop auth select [--organizationId <value>]
Options
Flag | Description | Required |
---|---|---|
--organizationId | ID of the organization to select | No |
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:
no organizations are authorized. see raindrop auth login.
Exit code: 2
Invalid organization ID:
org_INVALID123 not authenticated
Exit code: 2
Examples
First-time setup
Log into your organization for the first time:
raindrop auth login
The browser opens automatically. Complete the authentication flow. The CLI confirms your login:
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:
# Log into development organizationraindrop auth login# Complete authentication in browserLogged in as user@company.com to Development Team
# Log into production organizationraindrop auth login# Complete authentication in browserLogged in as user@company.com Production Environment
View all authenticated organizations:
raindrop auth list --output text
org_01ABC123XYZ - user@company.com Acme Corporg_01DEF456UVW - user@company.com Development Teamorg_01GHI789RST (current) - user@company.com Production Environment
Switch to your development organization using the interactive prompt:
raindrop auth select
Or specify the organization ID directly:
raindrop auth select --organizationId org_01DEF456UVW
Exit Codes
Code | Description |
---|---|
0 | Command completed successfully |
1 | Authentication timeout or manifest errors |
2 | Invalid arguments or organization not found |