morning-brief
Rule-based daily Gmail inbox triage. Zero LLM, read-only, Windows-friendly.
Classifies recent mail into HIGH / MEDIUM / LOW / SPAM from a YAML rules file, writes a markdown digest, and pops a desktop toast. Scan your inbox in thirty seconds instead of thirty minutes.
Why not an LLM-based tool
Paid-LLM triage tools like mailtrim and gmail-digest work, but cost money per run and fail silently when the API is down. For a personal inbox, most of the signal lives in sender domain plus a handful of subject keywords. Rules handle that case reliably and for free.
Install
pip install morning-brief
Windows users also want the toast helper:
pip install "morning-brief[windows]"
One-time setup
- Create a Google Cloud project, enable the Gmail API, create an OAuth 2.0 Client ID of type Desktop app, and download the JSON as
credentials.json. - Run
morning-brief initto scaffold~/.morning-brief/. - Drop
credentials.jsoninto~/.morning-brief/. - Edit
~/.morning-brief/rules.yamlto match your senders. - Run
morning-brief run. First run opens your browser for read-only consent and writestoken.jsonlocally.
Sub-day windows
morning-brief run --hours 4 # last four hours instead of last day
morning-brief run --hours 1 # quick post-lunch sweep
--hours overrides the default --days 1. Maps directly to Gmail's newer_than:Nh query.
Thread collapse
Conversations that fan out across many messages collapse to one digest entry annotated with (N msgs). On by default; pass --no-collapse-threads to keep the v0.2.0 one-line-per-message behaviour.
Debug your rules
morning-brief preview --sender "hr@canonical.com" --subject "Interview Tuesday"
# Bucket: HIGH
# Reason: high_sender:@canonical.com
morning-brief why <message-id>
# From: notifications@github.com
# Subject: Review requested on PR #42
# Stored: HIGH
# Now: HIGH
# Reason: high_keyword:review requested
preview answers "what would happen if I added this rule?" without calling Gmail. why looks up a stored message and shows whether your current rules.yaml would still classify it the same way.
Daily run
Windows Task Scheduler, WSL cron, or macOS launchd can each fire the command once a day at 8am.
Windows Task Scheduler: create a basic task triggered daily at 08:00 running morning-brief run.
WSL cron:
0 8 * * * /home/you/.local/bin/morning-brief run >> /tmp/morning-brief.log 2>&1
For toast notifications from WSL cron, install wsl-notify-send; morning-brief will pick it up automatically.
Rules
rules.yaml uses case-insensitive substring matching. The starter generated by morning-brief init covers GitHub notifications, common spam patterns, and a placeholder high-priority sender list.
Classification precedence: spam wins first, then high, then github-low, then medium (default).
Scope
- Read-only Gmail access. The tool never marks, labels, moves, or deletes mail.
- Writes digests to
~/.morning-brief/digests/YYYY-MM-DD.md. - Tracks processed message IDs locally for 7 days so reruns are idempotent.
Status
Alpha. Classifier is covered by unit tests; integration tests for the Gmail client come next.
License
MIT.
Metadata
Release files for morning-brief 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| morning_brief-0.3.0.tar.gz | 16.3 kB | Without provenance | Details for morning_brief-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| morning_brief-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for morning_brief-0.3.0-py3-none-any.whl |
Total release size: 31.3 kB
Release files / morning_brief-0.3.0.tar.gz
| Download URL | morning_brief-0.3.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5e84aa1e0b815fc105e828b8334bd0ed9317b0fee8a743e9a88639019a59548
|
|
BLAKE2b-256 checksum How to use checksums |
8b9d6b3fb5be8a1bf427842123092cacd8eb4d50de5832fb3b4d014dafa2cfb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / morning_brief-0.3.0-py3-none-any.whl
| Download URL | morning_brief-0.3.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd6caca14b0de2dc8106893001edcc20ccf1ec8b12c05c29fd26859ce310c720
|
|
BLAKE2b-256 checksum How to use checksums |
e7dd2dc1cff7713907c0448a8b01e0a9392caef6a2024e0c57f0b9877994b82f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for morning-brief 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.