Browser Login (Default)
API Token Login
For CI/CD, automation, or environments without a browser, pass an API token directly:| Option | Short | Description |
|---|---|---|
--token <token> | -t | API token (skips browser login) |
Piped / Non-Interactive Login
When stdin is not a terminal (e.g., inside a Docker container or piped from another command), the CLI cannot open a browser. It will prompt for an API token via stdin instead:--token nor environment variables are practical.
Custom API URL
Point the CLI at a different API endpoint:| Option | Description |
|---|---|
--api-url <url> | Custom API base URL (default: https://api.royaltyport.com) |
Environment Variables
For CI/CD pipelines and automation, set environment variables instead of runninglogin:
| Variable | Description |
|---|---|
ROYALTYPORT_TOKEN | API token — overrides stored credentials |
ROYALTYPORT_API_URL | Custom API base URL (default: https://api.royaltyport.com) |
Example
Auth Resolution Order
The CLI resolves credentials in this order:ROYALTYPORT_TOKENenvironment variable (highest priority)- OAuth access token (from browser login, auto-refreshed)
- Stored API token in
~/.config/royaltyport/config.json
ROYALTYPORT_API_URLenvironment variable- Stored
apiUrlin config - Default:
https://api.royaltyport.com
Logout
Clear all stored credentials and configuration:~/.config/royaltyport/config.json. Environment variables are not affected.