A simple command-line tool to extract OTP codes from your email inbox.
If you have Rust installed, you can install directly using cargo:
cargo install otpgetDon't have Rust? Install it first:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh- Place the
otpgetbinary in a directory of your choice - Run the setup wizard:
$ otpget --setup- Enter your email credentials and IMAP server.
- You can now run
otpgetwithout the--setupflag.
To check the latest emails once for OTP codes:
$ otpgetTo continuously monitor for new OTP codes (checks every 3 seconds):
$ otpget --retryPress Ctrl+C to stop monitoring.
- Yahoo Mail (default)
- Gmail (use
imap.gmail.comas IMAP_SERVER) - Other IMAP-compatible email providers (specify your provider's IMAP server)
For Gmail users: You'll need to use an App Password instead of your regular password. Generate an App Password here