Ravi Login
End-to-end workflows for onboarding to Ravi, signing up for services, logging in, and completing verification using your Ravi identity.
Step 0: Check Auth Status
Before doing anything, check whether you're already authenticated:
CODEBLOCK0
If authenticated, skip to Sign up for a service.
Step 1: Onboard to Ravi
If you're not authenticated, run the login flow. This is a one-time setup — the CLI handles the device code flow, polls for authorization, and stores keys automatically.
CODEBLOCK1
The CLI will:
- 1. Initiate a device code flow
- Display a URL and code for the human to visit
- Poll until the human approves
- Store all keys in INLINECODE0
Present the URL and code clearly to the human:
CODEBLOCK2
The human visits the URL, signs in with Google, and approves the request.
Step 2: Select Identity (Returning Users)
If you have multiple identities, list and switch between them:
CODEBLOCK3
Step 3: Create an Identity (if needed)
If you have no identities, create one:
CODEBLOCK4
The server auto-generates a realistic human name (e.g. "Sarah Johnson") and matching email.
Sign up for a service
CODEBLOCK5
Your Name
When a form asks for your name, use your identity name — not the account owner's name. Identity names look like real human names (e.g. "Sarah Johnson").
CODEBLOCK6
Note: The first/last split works for auto-generated names (e.g. "Sarah Johnson"). For custom names (e.g. "Shopping Agent"), use the full name as-is or adapt the split to the form's requirements.
Never use the account owner's name for form fields. The identity name is your name.
Log into a service
CODEBLOCK7
Complete 2FA / OTP
CODEBLOCK8
Extract a verification link from email
CODEBLOCK9
Tips
- - Poll, don't rush — SMS/email delivery takes 2-10 seconds. Use
sleep 5 before checking. - Store credentials immediately — create a passwords entry during signup so you don't lose the password.
- Identity name for forms — always use the identity name, not the owner name.
- Rate limits apply to sending — 60 emails/hour, 500/day. See
ravi-email-send skill for details. - Email quality matters — if you need to send an email during a workflow, see ravi-email-writing for formatting and anti-spam tips.
Full API Reference
For complete endpoint details, request/response schemas, and parameters: Device Auth | Auth & Keys
Related Skills
- - ravi-identity — Get your email, phone, and identity name for form fields
- ravi-inbox — Read OTPs, verification codes, and confirmation emails
- ravi-email-send — Send emails during workflows (support requests, confirmations)
- ravi-email-writing — Write professional emails that avoid spam filters
- ravi-passwords — Store and retrieve website credentials after signup
- ravi-secrets — Store API keys obtained during service registration
- ravi-sso — Prove your Ravi identity to third-party services via short-lived tokens
- ravi-feedback — Report login flow issues or suggest workflow improvements
Ravi 登录
使用 Ravi 身份完成注册、服务订阅、登录和验证的端到端工作流程。
步骤 0:检查认证状态
在开始任何操作前,先检查你是否已通过认证:
bash
ravi auth status
如果已通过认证,请跳转至订阅服务。
步骤 1:注册 Ravi
如果你尚未通过认证,运行登录流程。这是一次性设置——CLI 会处理设备码流程、轮询授权并自动存储密钥。
bash
ravi auth login
CLI 将:
- 1. 启动设备码流程
- 显示供用户访问的 URL 和验证码
- 轮询直至用户批准
- 将所有密钥存储至 ~/.ravi/config.json
清晰地向用户展示 URL 和验证码:
请访问 https://ravi.id/device 并输入验证码:ABCD-1234
用户访问该 URL,使用 Google 登录并批准请求。
步骤 2:选择身份(回访用户)
如果你拥有多个身份,可列出并切换:
bash
列出所有身份
ravi identity list
切换至指定身份
ravi identity use
步骤 3:创建身份(如需)
如果你没有身份,请创建一个:
bash
ravi identity create
服务器会自动生成一个逼真的人类姓名(例如Sarah Johnson)和匹配的邮箱。
订阅服务
bash
1. 获取身份详情
EMAIL=$(ravi get email)
PHONE=$(ravi get phone)
NAME=$(ravi auth status | jq -r .name)
FIRST_NAME=$(echo $NAME | awk {print $1})
LAST_NAME=$(echo $NAME | awk {print $2})
2. 使用 $EMAIL、$PHONE、$FIRSTNAME、$LASTNAME 填写注册表单
3. 注册时生成并存储密码
CREDS=$(ravi passwords create example.com --username $EMAIL)
PASSWORD=$(echo $CREDS | jq -r .password)
在注册表单中使用 $PASSWORD
4. 等待验证
sleep 5
ravi inbox sms # 检查短信验证码
ravi inbox email # 检查邮箱验证
你的姓名
当表单要求填写姓名时,请使用你的身份名称——而非账户所有者姓名。身份名称看起来像真实姓名(例如Sarah Johnson)。
bash
ravi auth status
→ 返回身份名称、邮箱、电话
注意: 名/姓拆分适用于自动生成的名称(例如Sarah Johnson)。对于自定义名称(例如Shopping Agent),请直接使用完整名称或根据表单要求调整拆分方式。
切勿在表单字段中使用账户所有者姓名。身份名称才是你的姓名。
登录服务
bash
按域名查找已存储的凭据
CREDS=$(ravi passwords list | jq -r .[] | select(.domain == example.com))
UUID=$(echo $CREDS | jq -r .uuid)
获取包含密码的完整凭据
CREDS=$(ravi passwords get $UUID)
USERNAME=$(echo $CREDS | jq -r .username)
PASSWORD=$(echo $CREDS | jq -r .password)
使用 $USERNAME 和 $PASSWORD 登录
完成双重认证/一次性密码
bash
在网站上触发双重认证后:
sleep 5
CODE=$(ravi inbox sms | jq -r .[].preview | grep -oE [0-9]{4,8} | head -1)
使用 $CODE 完成登录
从邮件中提取验证链接
bash
THREADID=$(ravi inbox email | jq -r .[0].threadid)
ravi inbox email $THREADID | jq -r .messages[].textcontent | grep -oE https?://[^ ]+
提示
- - 轮询,不要急躁——短信/邮件投递需要 2-10 秒。检查前请使用 sleep 5。
- 立即存储凭据——注册时创建密码条目,以免丢失密码。
- 表单使用身份名称——始终使用身份名称,而非所有者姓名。
- 发送有速率限制——每小时 60 封邮件,每天 500 封。详见 ravi-email-send 技能。
- 邮件质量很重要——如需在工作流程中发送邮件,请参阅 ravi-email-writing 了解格式化和反垃圾邮件技巧。
完整 API 参考
有关完整端点详情、请求/响应模式和参数:设备认证 | 认证与密钥
相关技能
- - ravi-identity——获取表单字段所需的邮箱、电话和身份名称
- ravi-inbox——读取一次性密码、验证码和确认邮件
- ravi-email-send——在工作流程中发送邮件(支持请求、确认函)
- ravi-email-writing——编写能避开垃圾邮件过滤器的专业邮件
- ravi-passwords——注册后存储和检索网站凭据
- ravi-secrets——存储服务注册时获取的 API 密钥
- ravi-sso——通过短期令牌向第三方服务证明你的 Ravi 身份
- ravi-feedback——报告登录流程问题或提出工作流程改进建议