3 releases
new 0.1.2 | Jan 8, 2025 |
---|---|
0.1.1 | Jan 8, 2025 |
0.1.0 | Jan 8, 2025 |
#250 in Authentication
114 downloads per month
19KB
257 lines
OTPGet
A simple command-line tool to extract OTP codes from your email inbox.
Installation
Using Cargo (Recommended)
If you have Rust installed, you can install directly using cargo:
cargo install otpget
Don't have Rust? Install it first:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Manual Setup
- Place the
otpget
binary in a directory of your choice - Run the setup wizard:
$ otpget --setup
- Enter your email credentials and IMAP server.
- You can now run
otpget
without the--setup
flag.
Usage
Single Check
To check the latest emails once for OTP codes:
$ otpget
Continuous Monitoring
To continuously monitor for new OTP codes (checks every 3 seconds):
$ otpget --retry
Press Ctrl+C to stop monitoring.
Supported Email Providers
- Yahoo Mail (default)
- Gmail (use
imap.gmail.com
as IMAP_SERVER) - Other IMAP-compatible email providers (specify your provider's IMAP server)
Note
For Gmail users: You'll need to use an App Password instead of your regular password. Generate an App Password here
Dependencies
~11–28MB
~474K SLoC