otpget

Crates.iootpget
lib.rsotpget
version0.1.2
sourcesrc
created_at2025-01-08 20:57:33.303533
updated_at2025-01-08 22:00:02.439211
descriptionA command-line tool for automatically retrieving OTP codes from email messages
homepagehttps://github.com/milopadma/otpget
repositoryhttps://github.com/milopadma/otpget
max_upload_size
id1509067
size65,396
mylo (Milopadma)

documentation

https://github.com/milopadma/otpget#readme

README

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

  1. Place the otpget binary in a directory of your choice
  2. Run the setup wizard:
$ otpget --setup
  1. Enter your email credentials and IMAP server.
  2. 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

Commit count: 10

cargo fmt