Skip to main content

Open-source IMAP-native replacement for Gmail API

Project description

Relay - protocol-native CLI for email management

CLIDiscordDocumentation

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

relaycli-0.0.1a3.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relaycli-0.0.1a3-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file relaycli-0.0.1a3.tar.gz.

File metadata

  • Download URL: relaycli-0.0.1a3.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for relaycli-0.0.1a3.tar.gz
Algorithm Hash digest
SHA256 c0524175f724a97e561701b877f2cb990d342b48cce442410e0fff0fadfa4c04
MD5 4db4539ab251e5751a296664ba13077c
BLAKE2b-256 8df5cdde32b1bca9a2e848ab8362d6e70974e6da7c00ab9b270f7b81de222e33

See more details on using hashes here.

File details

Details for the file relaycli-0.0.1a3-py3-none-any.whl.

File metadata

  • Download URL: relaycli-0.0.1a3-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for relaycli-0.0.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 b1cde4e38fb6efff3d5f41408b307ed8916e3c757aeec501d07209961621c171
MD5 438f9be1eb17b1f056e105841f1fd1f0
BLAKE2b-256 772ee3bbed6093a3b16617603f1edd5d4d5450142ec207848dc90064180840b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page