If you encounter any issue, make sure that App passwords are available for your account (Gmail Help).
As of July 2025, all you need is to turn 2-Step verification on.
2
Install the CLI
Copy
pip install relaycli
If you encounter issues, please follow the installation steps for either pip or uv and then run the corresponding installation command.
3
Connect the inbox
Copy
relay accounts add
4
Try out CLI commands
Copy
relay messages ls --unread
Copy
Using account: piedpiper Messages from richard@piedpiper.com┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓┃ UID ┃ Timestamp ┃ From ┃ Subject ┃ Snippet ┃┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━┩│ 15443 │ 2025-06-23 12:35:44 UTC │ gilfoyle@piedpiper.com │ Server │ The ││ │ │ │ migration │ migration ││ │ │ │ complete │ is done... ││ 15467 │ 2025-06-26 12:46:09 UTC │ dinesh@piedpiper.com │ RE: My │ Actually ││ │ │ │ code is │ Gilfoyle, ││ │ │ │ perfect │ your cod...│└───────┴──────────────────────────┴───────────────────────────────┴────────────┴────────────┘Showing 2 of 2 unread messages