Service Signup & Login
Overview
The most common use case for Ravi: an agent signs up for a service, receives a verification code, and stores the credentials — all without human intervention.
Sign up for a service
# 1. Get your Identity details
EMAIL=$(ravi get email --json | jq -r '.email')
PHONE=$(ravi get phone --json | jq -r '.phone_number')
NAME=$(ravi identity list --json | jq -r '.[0].name')
# 2. Generate and store credentials
CREDS=$(ravi passwords create example.com --username "$EMAIL" --json)
PASSWORD=$(echo "$CREDS" | jq -r '.password')
# 3. Fill the signup form with $EMAIL, $PHONE, $NAME, and $PASSWORD
# (agent fills the form in the browser or via API)
# 4. Wait for verification
sleep 5
# 5. Check for SMS OTP
CODE=$(ravi inbox sms --unread --json | jq -r '.[0].preview' | grep -oE '[0-9]{4,8}' | head -1)
# 6. Or check for email verification link
THREAD_ID=$(ravi inbox email --unread --json | jq -r '.[0].thread_id')
LINK=$(ravi inbox email "$THREAD_ID" --json | jq -r '.messages[].text_content' | grep -oE 'https?://[^ ]+')
# 7. Complete verification with $CODE or $LINK
Log into a service
# 1. Find stored credentials
ENTRY=$(ravi passwords list --json | jq -r '.[] | select(.domain == "example.com")')
UUID=$(echo "$ENTRY" | jq -r '.uuid')
# 2. Get decrypted credentials
CREDS=$(ravi passwords get "$UUID" --json)
USERNAME=$(echo "$CREDS" | jq -r '.username')
PASSWORD=$(echo "$CREDS" | jq -r '.password')
# 3. Use $USERNAME and $PASSWORD to log in
Complete 2FA / OTP
After triggering 2FA on a service:
# Wait for the code to arrive
sleep 5
# Extract OTP from SMS
CODE=$(ravi inbox sms --unread --json | jq -r '.[0].preview' | grep -oE '[0-9]{4,8}' | head -1)
# Or extract OTP from email
THREAD_ID=$(ravi inbox email --unread --json | jq -r '.[0].thread_id')
CODE=$(ravi inbox email "$THREAD_ID" --json | jq -r '.messages[].text_content' | grep -oE '[0-9]{4,8}' | head -1)
# Enter $CODE to complete verification
Extract a verification link
Some services send a “click to verify” link instead of a code:
THREAD_ID=$(ravi inbox email --unread --json | jq -r '.[0].thread_id')
ravi inbox email "$THREAD_ID" --json | jq -r '.messages[].text_content' | grep -oE 'https?://[^ ]+'
Tips
- Use your Identity name for forms — when asked for a name, use
ravi identity list --json | jq -r '.[0].name'. Don’t use the account owner’s name. - Store credentials immediately — create a password entry during signup so you don’t lose the password.
- Poll with delays — SMS and email delivery takes 2–10 seconds. Always
sleep 5before checking the inbox. - Auto-generate passwords —
ravi passwords create <domain> --jsonauto-generates a strong password and returns it in the response.
Next steps
- Real-World Scenarios — software evaluation, price monitoring, travel booking
- Credential Vault — more on password management