Skip to main content

AI-powered CLI tool that reads your Gmail, summarizes every email with AI, and tells you what to reply to first

Project description

๐Ÿ“ฌ Morning 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.

License: MIT Python 3.9+ AI: Groq


What It Does

$ morning-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 morning-email-brief

Setup (2 minutes, one time)

# 1. Choose AI provider (Groq or Gemini) & enter API key
morning-email-brief setup

# 2. Sign in with Google (opens browser)
morning-email-brief login

Use

morning-email-brief              # Generate today's briefing
morning-email-brief last         # Re-print the last briefing
morning-email-brief history      # List past briefing dates
morning-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)

  1. Triage โ€” classifies all 50 emails using only subject + snippet (cheap, fast)
  2. 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)

  1. Go to console.groq.com
  2. Sign up (Google or GitHub)
  3. API Keys โ†’ Create API Key โ†’ copy it
  4. Free tier: 14,400 requests/day โ€” more than enough

Gmail Access

Run morning-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

morning-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.readonly scope. 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 morning-email-brief
  • 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/rakheesingh/morning-email-brief.git
cd morning-email-brief/cli
pip install -e .

License

MIT โ€” see LICENSE for details.


If this tool saves you time, give it a star! โญ

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

morning_email_brief-1.0.1.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

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

morning_email_brief-1.0.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file morning_email_brief-1.0.1.tar.gz.

File metadata

  • Download URL: morning_email_brief-1.0.1.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for morning_email_brief-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fccef1dfbc912ceef91eb26af8227e390591cb679e881c67a693065be893ce0c
MD5 0a5d7133212fa8fd53f4a083a8dae8c7
BLAKE2b-256 2c44d0e78c497d61c141a43bd56a50598d0b06099c3f3394c950cd8c684e04c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for morning_email_brief-1.0.1.tar.gz:

Publisher: publish.yml on rakheesingh/morning-email-brief

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file morning_email_brief-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for morning_email_brief-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a571398f02c7ad102e9aa27fcc80a647feda621b8bfbee833924c3446f8da1cf
MD5 b82230ca642d0ab89266b880013c2ba0
BLAKE2b-256 c2e1b9809430801d7ebc3e68dc9c0bbd73882445918928b05eefd75c723ac1cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for morning_email_brief-1.0.1-py3-none-any.whl:

Publisher: publish.yml on rakheesingh/morning-email-brief

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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