AI-powered CLI tool that reads your Gmail, summarizes every email with AI, and tells you what to reply to first
Project description
๐ฌ Email Brief
AI-powered CLI tool that reads your Gmail inbox, summarizes every email in one sentence, and tells you what to reply to first.
Built for developers and busy professionals who get 50-100+ emails a day and miss the important ones.
What It Does
$ email-brief
๐ฌ Morning Email Briefing
Wednesday, April 8, 2026 at 10:00 AM
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
50 emails โ 1 urgent โ 5 important โ 3 need reply
๐ด REPLY NOW (1)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1. Production DB migration failing โ need your help
Alex Chen [โฉ REPLY] [Work]
โ Migration script throws FK constraint error on users table.
Alex is blocked and needs your fix before 2 PM deploy.
๐ IMPORTANT (5)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2. Offer Letter โ Senior Engineer at Acme Corp
Sarah from HR [โฉ REPLY] [HR]
โ Offer letter attached. Needs your signature by Friday.
3. Sprint retro moved to 4 PM
David Park [Meeting]
โ Calendar updated. New agenda includes Q2 planning.
๐ต FYI (15)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4. UPI transaction alert โ Rs.2,500 debited
HDFC Bank [Finance]
โช LOW PRIORITY (29)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
5. Your weekly newsletter from dev.to
DEV Community [Newsletter]
...
Key Features
- Smart triage โ AI classifies each email as Urgent, Important, FYI, or Low Priority
- AI summaries only where it matters โ urgent and important emails get detailed summaries, the rest just show subject lines (saves tokens)
- Detects what needs a reply โ highlights emails where a real person is waiting for your response
- Filters out noise โ charity spam, newsletters, promotions, automated alerts correctly classified as low priority
- Works with any Gmail account โ uses Google OAuth2 (read-only access)
- 100% free โ uses Groq free tier (14,400 requests/day) + Gmail API (free)
- Privacy-first โ emails are processed locally, never stored on any server
- Briefing history โ past briefings saved locally in SQLite
Quick Start
Install
pip install email-brief
Setup (2 minutes, one time)
# 1. Configure your free Groq API key
email-brief setup
# 2. Sign in with Google (opens browser)
email-brief login
Use
email-brief # Generate today's briefing
email-brief last # Re-print the last briefing
email-brief history # List past briefing dates
email-brief date 2026-04-08 # View a specific day's briefing
How It Works
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ Gmail API โโโโโโถโ Groq AI โโโโโโถโ Terminal โ
โ (read-only) โ โ (Llama 3.3) โ โ Output โ
โ โ โ โ โ โ
โ Fetch 50 โ โ Step 1: โ โ Sorted by โ
โ unread โ โ Triage ALL โ โ priority โ
โ emails โ โ (cheap) โ โ โ
โ โ โ โ โ AI summaries โ
โ โ โ Step 2: โ โ only for โ
โ โ โ Summarize โ โ urgent + โ
โ โ โ important โ โ important โ
โ โ โ only (smart) โ โ โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
2-Step AI Processing (saves 70% tokens)
- Triage โ classifies all 50 emails using only subject + snippet (cheap, fast)
- Summarize โ writes detailed summaries only for urgent + important emails (5-10 emails, not 50)
FYI and Low Priority emails just show the original snippet โ no AI call needed.
Getting API Keys (free)
Groq API Key (required)
- Go to console.groq.com
- Sign up (Google or GitHub)
- API Keys โ Create API Key โ copy it
- Free tier: 14,400 requests/day โ more than enough
Gmail Access
Run email-brief login โ opens your browser for Google sign-in. Read-only access, we never send or modify emails.
Configuration
All config is stored in ~/.email-brief/.env:
GROQ_API_KEY=gsk_xxxxx # Required: free from console.groq.com
GMAIL_CLIENT_ID=xxxxx # Set by auth server
GMAIL_CLIENT_SECRET=xxxxx # Set by auth server
AUTH_SERVER_URL=https://... # Auth server for Google sign-in
BRIEFING_TIME=10:00 # Daily schedule (for watch mode)
EMAIL_COUNT=50 # Number of emails to fetch
Project Structure
email-brief/
โโโ cli/ # Python CLI tool (pip installable)
โ โโโ email_brief/
โ โ โโโ main.py # CLI entry point
โ โ โโโ gmail_client.py # Gmail API + OAuth
โ โ โโโ summarizer.py # Groq/Gemini AI engine
โ โ โโโ prompts.py # AI prompt templates
โ โ โโโ prioritizer.py # Priority sorting
โ โ โโโ renderer.py # Terminal output (colors, formatting)
โ โ โโโ storage.py # SQLite briefing history
โ โ โโโ config.py # Environment config
โ โ โโโ types.py # Data models
โ โโโ pyproject.toml
โ
โโโ auth-server/ # Next.js server for Google OAuth
โโโ src/app/
โ โโโ page.tsx # Landing page
โ โโโ privacy/page.tsx # Privacy policy
โ โโโ terms/page.tsx # Terms of service
โ โโโ api/auth/ # OAuth routes
โโโ package.json
Privacy & Security
- Read-only access โ we only use the
gmail.readonlyscope. We cannot send, delete, or modify your emails. - Local processing โ your emails are processed on your machine. Email content is sent to Groq/Gemini API for summarization but never stored on any server.
- Local storage โ OAuth tokens and briefing history are stored locally in
~/.email-brief/. Nothing is uploaded. - Open source โ review every line of code to verify exactly how your data is handled.
Supported AI Providers
| Provider | Model | Cost | Setup |
|---|---|---|---|
| Groq (default) | Llama 3.3 70B | Free (14,400 req/day) | console.groq.com |
| Google Gemini | Gemini 2.0 Flash | Free (1,500 req/day) | aistudio.google.com |
Set GROQ_API_KEY or GEMINI_API_KEY in your config. Groq is recommended (faster, higher limits).
Tech Stack
- Python 3.9+
- Groq โ Llama 3.3 70B for email triage and summarization
- Gmail API โ OAuth2 read-only access
- SQLite โ local briefing history
- Next.js โ auth server for Google sign-in (hosted on Vercel)
Roadmap
- CLI tool with
pip install - Gmail integration (OAuth2)
- AI-powered triage + summarization
- Smart priority scoring (Urgent โ Important โ FYI โ Low)
- 2-step AI processing (70% token savings)
- Briefing history (SQLite)
- Outlook / Microsoft 365 support
- Daily email digest (get briefing in your inbox)
- Chrome extension
- Web dashboard
- Slack/Discord notifications
- Custom priority rules per user
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
# Clone and setup for development
git clone https://github.com/yourusername/email-brief.git
cd email-brief/cli
pip install -e .
License
MIT โ see LICENSE for details.
If this tool saves you time, give it a star! โญ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file morning_email_brief-1.0.0.tar.gz.
File metadata
- Download URL: morning_email_brief-1.0.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c489a88cfc7fc332bcfb2b5f0104dab36b3fe02bfae68852a44cf23790f7b16
|
|
| MD5 |
7fb57109184235aa20cf5fed97cc5fcd
|
|
| BLAKE2b-256 |
315156f394056dd836369e2dea4191d582b55639cdc7b94943d6ace267046da7
|
Provenance
The following attestation bundles were made for morning_email_brief-1.0.0.tar.gz:
Publisher:
publish.yml on rakheesingh/morning-email-brief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
morning_email_brief-1.0.0.tar.gz -
Subject digest:
1c489a88cfc7fc332bcfb2b5f0104dab36b3fe02bfae68852a44cf23790f7b16 - Sigstore transparency entry: 1286396709
- Sigstore integration time:
-
Permalink:
rakheesingh/morning-email-brief@c56d5323d4e1a33c744870c1fbb1531f8397d23e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rakheesingh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c56d5323d4e1a33c744870c1fbb1531f8397d23e -
Trigger Event:
release
-
Statement type:
File details
Details for the file morning_email_brief-1.0.0-py3-none-any.whl.
File metadata
- Download URL: morning_email_brief-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82efd67bdafb80b11e614a55a38679aa100efbeac223891b08ece4b16a44dbd2
|
|
| MD5 |
ee6dcd553cb9ec35ef6b1632a64c3372
|
|
| BLAKE2b-256 |
86a3e5b7f7d552d8496d08809225e257f15db70b50babda7c5d2afbcdfae2244
|
Provenance
The following attestation bundles were made for morning_email_brief-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on rakheesingh/morning-email-brief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
morning_email_brief-1.0.0-py3-none-any.whl -
Subject digest:
82efd67bdafb80b11e614a55a38679aa100efbeac223891b08ece4b16a44dbd2 - Sigstore transparency entry: 1286396844
- Sigstore integration time:
-
Permalink:
rakheesingh/morning-email-brief@c56d5323d4e1a33c744870c1fbb1531f8397d23e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rakheesingh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c56d5323d4e1a33c744870c1fbb1531f8397d23e -
Trigger Event:
release
-
Statement type: