Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Relay - protocol-native CLI for email management

CLI ・ Discord ・ Documentation

CI Status ruff ty Test coverage percentage

PyPi Version GitHub release (latest by date) License

Discord Twitter

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 --unread
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...│
│ 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 15443
Using 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 relaycli

2 - Connect your email account

relay accounts add

Follow 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.

FOSSA Status

Metadata

Release files for relaycli 0.0.1a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for relaycli 0.0.1a3
File Size Uploaded
relaycli-0.0.1a3.tar.gz 24.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for relaycli 0.0.1a3
File Interpreter ABI Platform
relaycli-0.0.1a3-py3-none-any.whl Python 3 none any Details

Total release size: 55.6 kB

Release files / relaycli-0.0.1a3.tar.gz

Download URL relaycli-0.0.1a3.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c0524175f724a97e561701b877f2cb990d342b48cce442410e0fff0fadfa4c04
BLAKE2b-256 checksum
How to use checksums
8df5cdde32b1bca9a2e848ab8362d6e70974e6da7c00ab9b270f7b81de222e33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.20

Release files / relaycli-0.0.1a3-py3-none-any.whl

Download URL relaycli-0.0.1a3-py3-none-any.whl
Size 30.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1cde4e38fb6efff3d5f41408b307ed8916e3c757aeec501d07209961621c171
BLAKE2b-256 checksum
How to use checksums
772ee3bbed6093a3b16617603f1edd5d4d5450142ec207848dc90064180840b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.20
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page