The official command-line interface for the Rownd authentication platform.
npm install -g @rownd/cli-
Authenticate with Rownd:
rownd auth login --token your_bearer_token_here
-
List your applications:
rownd app list --account your_account_id
-
Create a new application:
rownd app create --name "My New App" --account your_account_id
The CLI supports multiple authentication methods, checked in order of precedence:
- Bearer token flag:
--token your_token_here - Environment variable:
ROWND_API_TOKEN=your_token_here - Stored credentials: Use
rownd auth loginto store tokens locally
# Store authentication token locally
rownd auth login --token your_bearer_token
# Check authentication status
rownd auth status
# Remove stored authentication
rownd auth logout# List applications
rownd app list --account your_account_id
# Get application details
rownd app get your_app_id
# Create a new application
rownd app create --name "My App" --description "App description" --account your_account_id
# Update an application
rownd app update your_app_id --name "Updated Name" --description "New description"
# Delete an application (with confirmation)
rownd app delete your_app_id# Get application schema
rownd app schema get your_app_id
# Update schema from JSON string
rownd app schema update your_app_id --schema '{"fields": {"email": {"type": "string"}}}'
# Update schema from file
rownd app schema update your_app_id --schema @schema.json# Get application configuration
rownd app config get your_app_id
# Update configuration from JSON string
rownd app config update your_app_id --config '{"subdomain": "myapp"}'
# Update configuration from file
rownd app config update your_app_id --config @config.json# List application credentials
rownd app creds list your_app_id
# Create new credentials
rownd app creds create your_app_id --name "Production API"
# Get credential details
rownd app creds get your_app_id your_client_id
# Delete credentials (with confirmation)
rownd app creds delete your_app_id your_client_id# List users with pagination
rownd user list your_app_id --page-size 100
# Get specific user
rownd user get your_app_id your_user_id
# Delete user (with confirmation)
rownd user delete your_app_id your_user_id# Filter by field values
rownd user list your_app_id --lookup "email:john@example.com"
# Filter by multiple user IDs
rownd user list your_app_id --ids "user1,user2,user3"
# Get specific fields only
rownd user list your_app_id --fields "email,first_name,last_name"
# Pagination
rownd user list your_app_id --page-size 50 --after "last_user_id"# Get all user data
rownd user data get your_app_id your_user_id
# Get specific field
rownd user data get your_app_id your_user_id --field email
# Update user data from JSON
rownd user data update your_app_id your_user_id --data '{"email": "new@example.com"}'
# Update user data from file
rownd user data update your_app_id your_user_id --data @user_data.json
# Update specific field
rownd user data update your_app_id your_user_id --field email --value "new@example.com"The CLI supports two output formats:
rownd app list --format jsonrownd app list --format tableExample table output:
id | name | created_at
app_123 | My App | 2024-01-01T10:00:00Z
app_456 | Another App | 2024-01-02T11:00:00Z
--token <token>: Bearer token for authentication--format <format>: Output format (jsonortable)--quiet: Suppress non-essential output--verbose: Show additional debug information--force: Skip confirmation prompts (where applicable)
# 1. Authenticate
rownd auth login --token your_bearer_token
# 2. Create application
rownd app create --name "My SaaS App" --account your_account_id
# 3. Update schema
rownd app schema update your_app_id --schema '{
"fields": {
"email": {"type": "string", "required": true},
"first_name": {"type": "string"},
"last_name": {"type": "string"},
"company": {"type": "string"}
}
}'
# 4. Create API credentials
rownd app creds create your_app_id --name "Production API"
# 5. List users
rownd user list your_app_id --format table# Find all users with gmail addresses
rownd user list your_app_id --lookup "email:*@gmail.com" --format table
# Get all user data for specific users
rownd user list your_app_id --ids "user1,user2,user3" --fields "email,first_name,last_name"
# Update multiple users (requires scripting)
for user_id in user1 user2 user3; do
rownd user data update your_app_id $user_id --field "company" --value "New Company"
doneThe CLI stores configuration in ~/.config/rownd/config.json. This includes:
- Stored authentication tokens
- Default account settings
- API base URL (for development)
You can manually edit this file or use rownd auth commands to manage it.
The CLI provides clear error messages for common scenarios:
- Authentication errors: Guidance on fixing credentials
- Validation errors: Details on invalid input
- Network errors: Suggestions for troubleshooting
- Rate limiting: Automatic retry with exponential backoff
- Node.js 18.0.0 or higher
- Valid Rownd account and API credentials
To contribute to the CLI or run from source:
# Clone the repository
git clone https://github.com/rownd/cli.git
cd cli
# Install dependencies
npm install
# Build the project
npm run build
# Link for local testing
npm link
# Test the CLI
rownd --helpMIT License - see LICENSE file for details.