Skip to main content

Local-first Gmail inbox analyzer and cleanup tool

Project description

InboxDNA

A local-first Gmail inbox analyzer and cleanup tool. Your emails never leave your machine.

Python License

Why InboxDNA?

Cloud email cleaners (Clean Email, SaneBox, Unroll.me) require full access to your mailbox on their servers. InboxDNA runs entirely on your computer — no third-party servers, no data collection, no subscriptions.

Features

  • Bulk Cleanup — Scan your inbox, see top senders, delete/block/unsubscribe in bulk
  • Inbox Hygiene Score — 0-100 composite score with streaks and badges
  • Storage Cost Visualizer — Treemap of storage by sender, Google One cost estimates
  • Subscription Decay Radar — Spot subscriptions you've stopped reading
  • Quiet Hours Heatmap — See when emails arrive (and who's emailing at 3am)
  • Reply Debt Tracker — Find unanswered emails that need a response
  • Inbox Time Machine — Track inbox growth and composition over time
  • Ghost Rules — Auto-suggest Gmail filters from your triage patterns
  • Email DNA Cards — Deep profile for any sender (frequency, tracking pixels, dark patterns)
  • Privacy Audit — Scan for tracking pixels, sensitive data exposure, known trackers
  • Triage Mode — Rapid one-click review: keep, archive, delete, block, or unsubscribe per sender
  • Dark Mode — Automatic (follows OS) or manual toggle between light, dark, and auto themes
  • Keyboard Shortcuts — J/K to navigate, X to select, E to archive, ? for help

Install

Option A: pip install (recommended)

pip install inboxdna
inboxdna

Option B: Run from source

git clone https://github.com/blaiseratcliffe/inboxdna.git
cd inboxdna
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -e .
inboxdna

Option C: Standalone executable (Windows / macOS / Linux)

Download the binary for your platform from the Releases page and run it. No Python required.

Platform File How to run
Windows InboxDNA.exe Double-click or run from terminal
macOS InboxDNA chmod +x InboxDNA && ./InboxDNA
Linux InboxDNA chmod +x InboxDNA && ./InboxDNA

Open http://localhost:5000 in your browser. On first run, a browser window will open asking you to sign in with your Google account.

Google Sign-In

InboxDNA includes pre-configured OAuth credentials so you can start using it immediately — no Google Cloud setup required.

When you authorize InboxDNA for the first time, Google will show a warning that says "Google hasn't verified this app". This is normal and expected for open-source projects. To proceed:

  1. Click "Advanced"
  2. Click "Go to InboxDNA (unsafe)"
  3. Review the permissions and click "Allow"

Why does this warning appear?

Google requires apps that access Gmail to go through a formal security review (CASA audit). This process is designed for commercial SaaS products and costs thousands of dollars — it doesn't make sense for a free, open-source, local-only tool.

The warning does not mean InboxDNA is unsafe. It means Google hasn't reviewed it. You can verify this yourself: the entire source code is right here, and your data never leaves your machine. InboxDNA talks directly to Gmail's API from your computer — there is no intermediary server.

What permissions does InboxDNA request?

Scope What it does Why it's needed
gmail.modify Read, delete, archive, and label messages Core inbox cleanup features
gmail.labels Create and manage labels Organize emails by label
gmail.settings.basic Create email filters Ghost Rules (auto-filter suggestions)

InboxDNA does not request permission to send emails on your behalf.

Using your own credentials (optional)

If you prefer to use your own Google Cloud project instead of the bundled credentials:

  1. Go to Google Cloud Console
  2. Create a project and enable the Gmail API
  3. Create an OAuth 2.0 Client ID (Desktop app)
  4. Download the JSON and save it as credentials.json in ~/.inboxdna/

InboxDNA will use your credentials.json if present, falling back to the bundled credentials otherwise.

Where is my data stored?

All data is stored locally in ~/.inboxdna/:

File Contents
email_organizer.db SQLite database (cached inbox data, scores, history)
token.json Your Gmail OAuth token (owner-only permissions)
stats.json Cleanup statistics
.flask_secret Session key (persists across restarts)

Standalone executables store data in platform-appropriate locations:

Platform Data location
Windows exe %LOCALAPPDATA%\InboxDNA
macOS exe ~/Library/Application Support/InboxDNA
Linux exe ~/.local/share/InboxDNA

You can override the data location on any platform by setting the INBOXDNA_DATA_DIR environment variable.

Tech Stack

  • Backend: Python / Flask
  • Frontend: Single-page HTML with inline JS/CSS, WCAG 2.1 AA accessible
  • Database: SQLite with WAL mode (local)
  • API: Google Gmail API via OAuth 2.0

Security

InboxDNA includes the following security measures:

  • CSRF protection via Origin/Referer header validation on all mutating requests
  • Explicit localhost-only binding (127.0.0.1)
  • Security headers: CSP, X-Frame-Options DENY, X-Content-Type-Options nosniff
  • Input validation on all API endpoints (message ID format, type, length caps)
  • OAuth token stored with restrictive file permissions (0600)
  • Thread-safe auth with locking, per-thread SQLite connections
  • SQLite busy timeout to prevent concurrent write errors

Privacy

InboxDNA is 100% local. No telemetry, no analytics, no external services beyond the Gmail API. Your data stays in a SQLite file on your machine.

Your OAuth token is stored locally and is never transmitted anywhere. You can revoke access at any time from your Google Account permissions page.

Building standalone executables

pip install pyinstaller
python build_exe.py

This produces a single-file binary in dist/ for whatever platform you're building on. PyInstaller must be run on each target OS — cross-compilation is not supported.

Build OS Output
Windows dist/InboxDNA.exe (34 MB)
macOS dist/InboxDNA (Unix binary)
Linux dist/InboxDNA (Unix binary)

Support

If InboxDNA saves you time, consider buying me a coffee:

Buy Me A Coffee

License

Apache 2.0 — see LICENSE

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

inboxdna-1.0.1.tar.gz (270.5 kB view details)

Uploaded Source

Built Distribution

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

inboxdna-1.0.1-py3-none-any.whl (267.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: inboxdna-1.0.1.tar.gz
  • Upload date:
  • Size: 270.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for inboxdna-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b5e3b9b68a3bba664f53c29ef3483670f499a4e5d2051d52cb5ffc544f8706f4
MD5 1cf3b1ecff8c5516b2499842ce2eeba0
BLAKE2b-256 26e6198a5b402661279f0eb48f9da1fadda85cf76ee1d11522d3abdde1229547

See more details on using hashes here.

File details

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

File metadata

  • Download URL: inboxdna-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 267.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for inboxdna-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef024330cd9919a632ddab714abe80145e147d3b2c752cfbb6ed51cb243cf55e
MD5 ce8c19b2b8096d6b3446b1f838c82d9b
BLAKE2b-256 53ae00655e0b4eec3890f89fd7a67f68a7ec8117e946f9f14dfc9daf88051a6d

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