Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .cursor/rules/010-overview.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,3 @@ This project's goal is to enable builders to create email-based apps

### Documentation
- Fast track the installation, usage and contribution of users

### Backend API
- Allow users to host online a REST API to develop email-based services
- Handle user authentication (OAuth 2 using JWT as bearer tokens)
- Handle OAuth connections (Google account)
- Enable the fetching and labeling of emails (metadata in relational database + image/video in storage)
31 changes: 22 additions & 9 deletions .cursor/rules/020-structure.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,34 @@ The codebase includes several applications with separate tech stacks and folders

- `.github/`: GitHub CI configuration
- `.cursor/rules`: rules for coding assistants
- `.vscode`: IDE settings
- `./relay`: core library for email management
- `./cli`: CLI for email management
- [Makefile](mdc:Makefile) high-level project commands
- `./tests`: test suite
- `./docs`: project documentation
- [Makefile](mdc:Makefile): high-level project commands
- [.pre-commit-config.yaml](mdc:.pre-commit-config.yaml): pre-commit configuration file
- [pyproject.toml](mdc:pyproject.toml): project configuration file
- [uv.lock](mdc:uv.lock): lockfile for the Docker orchestration
- [Dockerfile](mdc:Dockerfile): dockerfile
- [README.md](mdc:README.md): readme
- [CONTRIBUTING.md](mdc:CONTRIBUTING.md): contribution guide
- [CODE_OF_CONDUCT.md](mdc:CODE_OF_CONDUCT.md): code of conduct
- [LICENSE](mdc:LICENSE): license copy

## Core library
The core library is a Python library + CLI for sync and async email operations, organized as follows:
- [client.py](mdc:relay/client.py): main entry point
- [config.py](mdc:relay/config.py): configuration management
- [exceptions.py](mdc:relay/exceptions.py): SDK-specific exceptions
- `auth/`: authentication system (creds, oauth flow, secure storage)
- [account.py](mdc:relay/auth/account.py): email account management
- [credentials.py](mdc:relay/auth/credentials.py): credentials management
- [storage.py](mdc:relay/auth/storage.py): storage management
- `models/`: data models (translatable to other languages)
- `providers/`: email provider implementations
- `gmail/`: Gmail connection
- `outlook/`: Outlook connection
- `imap/`: IMAP connection
- `smtp/`: SMTP connection
- `auth/`: authentication system (creds, oauth flow, secure storage)
- [imap.py](mdc:relay/providers/imap.py): IMAP connection
- [smtp.py](mdc:relay/providers/smtp.py): SMTP connection
- [utils.py](mdc:relay/providers/utils.py): utilities
- `cli/`: CLI
- [main.py](mdc:relay/cli/main.py): Typer app definition
- `commands/`
- [account.py](mdc:relay/cli/commands/account.py): account related commands
- [messages.py](mdc:relay/cli/commands/messages.py): messages related commands
7 changes: 2 additions & 5 deletions .cursor/rules/030-tech-stack.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ This is a thorough description of technology choices for the project. We want to
## General
- Makefile

## Backend API
## Core library
- Python 3.11+
- Pydantic for model validation
- Typer for the CLI
- uv for dependency management
- ty for type checking
- ruff for code styling & format
- pytest as testing framework


## CLI
- Typer

## Documentation
- Mintlify
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="https://relaycli.com"><img src="https://zugjkckdxhiamdlkxfmv.supabase.co/storage/v1/object/public/assets//logo_light.svg" width="75" height="75"></a>
</p>
<h1 align="center">
Relay - Claude Code meets Gmail API
Relay - protocol-native CLI for email management
</h1>
<p align="center">
<a href="https://github.com/relaycli/relay">CLI</a> ・
Expand All @@ -19,7 +19,7 @@
<img src="https://img.shields.io/badge/Linter-Ruff-FCC21B?style=flat-square&logo=ruff&logoColor=white" alt="ruff">
</a>
<a href="https://github.com/astral-sh/ty">
<img src="https://img.shields.io/badge/Typecheck-Ty-261230?style=flat-square&logo=astral&logoColor=white" alt="ruff">
<img src="https://img.shields.io/badge/Typecheck-Ty-261230?style=flat-square&logo=astral&logoColor=white" alt="ty">
</a>
<a href="https://codecov.io/gh/relaycli/relay">
<img src="https://img.shields.io/codecov/c/github/relaycli/relay.svg?logo=codecov&style=flat-square&token=48QKJKDCYP" alt="Test coverage percentage">
Expand All @@ -36,10 +36,10 @@
</p>
<p align="center">
<a href="https://discord.gg/T4zbT7RcVy">
<img src="https://img.shields.io/badge/Discord-Community-5865F2?style=flat-square&logo=discord&logoColor=white" />
<img src="https://img.shields.io/badge/Discord-Community-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord">
</a>
<a href="https://twitter.com/relaycli">
<img src="https://img.shields.io/badge/-@relaycli-1D9BF0?style=flat-square&logo=twitter&logoColor=white" alt="Twitter">
<img src="https://img.shields.io/badge/Twitter-@relaycli-1D9BF0?style=flat-square&logo=twitter&logoColor=white" alt="Twitter">
</a>
</p>

Expand All @@ -60,9 +60,7 @@ That's it!

### Prerequisites

- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [UV](https://docs.astral.sh/uv/getting-started/installation/)
- [Make](https://www.gnu.org/software/make/) (optional)

### 30 seconds setup ⏱️

Expand Down
3 changes: 0 additions & 3 deletions docs/changelog/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ The changelog below reflects new product developments and updates on a monthly b
### 📧 Email Provider Support

* Gmail (via App Passwords)
* Outlook/Hotmail (via App Passwords)
* Yahoo Mail
* FastMail
* Custom IMAP/SMTP servers

### 🚀 Getting Started
Expand Down
8 changes: 7 additions & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,11 @@
},
"fonts": {
"family": "Geist Mono"
}
},
"integrations": {
"posthog": {
"apiKey": "phc_KM92OpgE50LK7fNerCe2JOq8KaSJeWRKfgpY2L9it5i",
"apiHost": "https://eu.i.posthog.com"
}
}
}
2 changes: 1 addition & 1 deletion relay/cli/utils.py → relay/cli/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AliasGroup(TyperGroup):

_CMD_SPLIT_P = re.compile(r" ?[,|] ?")

def get_command(self, ctx, cmd_name): # noqa: D102
def get_command(self, ctx, cmd_name):
cmd_name = self._group_cmd_name(cmd_name)
return super().get_command(ctx, cmd_name)

Expand Down
2 changes: 1 addition & 1 deletion relay/cli/commands/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from relay.models.account import PROVIDER_CONFIGS, AccountCreate, EmailProvider
from relay.providers.utils import resolve_provider

from ..utils import AliasGroup, create_accounts_table
from .._utils import AliasGroup, create_accounts_table

console = Console()
app = typer.Typer(help="Account management commands", cls=AliasGroup)
Expand Down
2 changes: 1 addition & 1 deletion relay/cli/commands/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from relay.exceptions import AccountNotFoundError, AuthenticationError, ServerConnectionError, ValidationError
from relay.models.message import MessageSummary

from ..utils import AliasGroup, create_messages_table
from .._utils import AliasGroup, create_messages_table

console = Console()
app = typer.Typer(help="Email message commands", cls=AliasGroup)
Expand Down