Relay - protocol-native CLI for email management
CLI ・ Discord ・ Documentation
Relay helps builds create apps on email workflows. See it as a crossover between an email client and Claude code ✉️
Quick Tour
Fetching your unread emails
relay messages ls --limit 10 --unreadUsing 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...│
│ 15555 │ 2025-07-08 15:46:27 UTC │ jared@piedpiper.com │ Team │ Hi guys! │
│ │ │ │ building │ I've │
│ │ │ │ retreat │ organized..│
│ 15587 │ 2025-07-10 13:34:48 UTC │ monica@raviga.com │ Q3 │ Richard, │
│ │ │ │ metrics │ we need to │
│ │ │ │ review │ discuss... │
│ 15588 │ 2025-07-10 14:22:49 UTC │ gavin@hooli.com │ Acquisition│ Pied Piper │
│ │ │ │ offer │ team, I'm │
│ │ │ │ │ prepared...│
└───────┴──────────────────────────┴───────────────────────────────┴────────────┴────────────┘
Showing 5 of 5 unread messages
Reading email details
relay messages cat 15443Using account: piedpiper
Message Details
UID: 15443
Timestamp: 2025-06-23 12:35:44 UTC
Subject: Server migration complete
From: "Bertram Gilfoyle" <gilfoyle@piedpiper.com>
To: richard@piedpiper.com
CC: dinesh@piedpiper.com, jared@piedpiper.com
BCC: N/A
Message Body:
The migration is done. Obviously.
While you were all probably panicking about downtime (which never happened),
I successfully migrated our entire server infrastructure to the new data center.
Key accomplishments:
- Migrated 47 servers in 3.2 hours
- Implemented redundant failsafes
- Optimized database queries by 340%
- Fixed 23 security vulnerabilities
Richard, the system is now running at 99.97% efficiency. The remaining 0.03%
is due to the laws of physics, which even I cannot override.
Dinesh, I've documented everything in a way that even you might comprehend,
though I make no guarantees.
The servers are purring like a well-fed cat. You may now return to your
regularly scheduled mediocrity.
--
Bertram Gilfoyle
Senior Systems Architect
Pied Piper Inc.
No attachments
Get started 🚀
Prerequisites
30 seconds setup ⏱️ (docs)
1 - Install the CLI
pip install relaycli2 - Connect your email account
relay accounts addFollow the instructions to connect your email account.
3 - Play with the CLI
relay messages --help Usage: relay messages [OPTIONS] COMMAND [ARGS]...
Email message commands
╭─ Options ──────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────╮
│ list | ls List recent emails from specified account. │
│ open | cat Read a single email message by UID. │
│ search | find | grep Search for messages containing the specified query. │
│ trash | rm Move a message to trash. │
│ spam Mark a message as spam. │
│ mark Mark a message as read or unread. │
╰────────────────────────────────────────────────────────────────────────────────────────────╯
Contributing
Oh hello there 👋 If you've scrolled this far, we bet it's because you like open-source. Do you feel like integrating a new email provider? Or perhaps improve our documentation? Or contributing in any other way?
You're in luck! You'll find everything you need in our contributing guide to help grow this project! And if you're interested, you can join us on Discord 🤗
Copying & distribution
Copyright (C) 2025, Relay.
This program is licensed under the Apache License 2.0.
See LICENSE or go to https://www.apache.org/licenses/LICENSE-2.0 for full license details.
On this page
Languages
Python92.0%Makefile4.1%Shell2.7%Dockerfile1.2%
Apache License 2.0
Created July 7, 2025
Updated December 17, 2025