leo otp
本页由 Cobra 命令树生成;命令、参数和输出保持 CLI 原文。
leo otp
Section titled “leo otp”Find recent email verification codes
Synopsis
Section titled “Synopsis”Find verification codes in recent inbox mail. Match KEYWORD in the sender, subject or body. Print the local send time, minutes ago (e.g. -5m), and code, one line per matching email. Use -O/–origin to print the send time, subject and decoded body of matching emails. Omit KEYWORD to list recent emails without a keyword filter. Email listing defaults to the last five minutes. Use –watch to keep listening for new mail until Ctrl+C. –wait queries once, then pauses two seconds between queries.
Gmail setup:
- Enable 2-Step Verification. App password instructions: https://support.google.com/accounts/answer/185833?hl=zh-Hans
- Create an app password for the Gmail account you want to query: https://myaccount.google.com/apppasswords
- Set email and app_password for that mailbox under otp.accounts.gmail.mailboxes in ~/.config/leo-cli/config.yaml.
leo otp [KEYWORD] [flags]Examples
Section titled “Examples” leo otp example -a gmail --mailbox work -u testuser --watch leo otp example -a gmail -u testuser -O leo otp -a gmail -u testuser -m 30Options
Section titled “Options” -a, --account string Mail provider (gmail) (default "gmail") -c, --code string Code format, for example 4d for four digits (default "6d") --debug Show connection and filtering diagnostics on stderr -h, --help help for otp --mailbox string Select a mailbox by its name in config.yaml -m, --minutes int Look back this many minutes (5 when listing emails) (default 3) -O, --origin Print matching emails with send time, subject and decoded body -u, --user string Match this text in the recipient --wait duration Keep checking for new mail for this duration, for example 30s --watch Keep listening for new mail until Ctrl+C, reconnecting if neededOptions inherited from parent commands
Section titled “Options inherited from parent commands” -v, --version Print versionSEE ALSO
Section titled “SEE ALSO”- leo - Personal command-line tools