Skip to main content

InboxPie CLI - Visualize and clean your inbox. Private, local, open source.

The CLI version of InboxPie is a local-first Python command-line tool for macOS that scans Apple Mail metadata and generates audit analytics compatible with the Thunderbird extension.

Thunderbird users can use the InboxPie Thunderbird extension to visualize and clean their inbox.

We are currently in progress to bring InboxPie to other mailboxes like O365 and other Clients in the near future. If you are interested in helping us with this, please contribute to the project

Install from PyPI

pip install inboxpie

Install from Github repo

cd CLI
python -m venv .venv
source .venv/bin/activate
pip install -e .

Commands

inboxpie version
inboxpie privacy-settings   # macOS: open Full Disk Access in System Settings
inboxpie scan --source apple-mail [--mode auto|index|emlx] [--mail-root PATH] [--folders "INBOX,Sent"] [--output terminal|csv|json|html|all] [--report-dir DIR] [--privacy]

Full Disk Access (required on macOS)

Reading ~/Library/Mail/ requires Full Disk Access for the app where you run the command — Terminal, iTerm, Cursor, VS Code, etc. — not inboxpie and not Python.

First-time setup:

  1. Run inboxpie privacy-settings to open System Settings → Privacy & Security → Full Disk Access.
  2. Enable the app InboxPie detects (e.g. Cursor if you use Cursor’s terminal). If detection fails, match the app in your menu bar / window title.
  3. Quit that app completely (Cmd+Q), reopen it, then scan again.

If a scan fails for permissions, inboxpie scan prints which app to enable and reminds you to run inboxpie privacy-settings.

  • auto / index: need FDA for the Envelope Index.
  • emlx: also needs FDA to walk ~/Library/Mail/ on recent macOS versions.

Security: FDA applies to the whole host app, not only inboxpie. Any command run in that same terminal can read protected folders until you revoke access. Use a terminal you trust, toggle FDA off when finished

Scan strategy

Apple Mail stores messages in two places that InboxPie can read locally:

Layer What it is InboxPie mode
Envelope Index SQLite catalog Mail.app uses for search, folders, and flags --mode index
.emlx files One file per message under ~/Library/Mail/V*/ --mode emlx

Default: --mode auto

  1. Read the Envelope Index first — fast, and aligned with what Mail.app shows.
  2. If the index is unavailable (permissions, missing file, schema mismatch), fall back to .emlx automatically.

Scan modes

  • auto (default): Envelope Index first, .emlx fallback.
  • index: Envelope Index only. Fails with a clear error if Full Disk Access is missing or the schema is not recognized.
  • emlx: Walk .emlx files only. Slower, but useful when you want filesystem-level scanning or the index is unavailable.

Both engines read metadata only — headers, plist flags, dates, folder paths, and size. Message bodies are never parsed or stored.

Outputs

  • Terminal summary (rich tables)
  • CSV report: mail-audit-report.csv
  • JSON report: mail-audit-report.json
  • Static HTML report: --report-dir/inboxpie-report.html

The HTML report mirrors the Thunderbird extension dashboard: PieView, sender/domain drill-down, timeline insights, and selection + review. Use checkboxes or Select buttons to build a set, then open Review Selected to search and inspect subject, sender, folder, date, and size. Export the selection as CSV. There are no move actions in the CLI report (read-only).

PieView By Sender Timeline

Examples

# macOS first-time: open Full Disk Access, enable your terminal app, quit & reopen it
inboxpie privacy-settings

# Default scan (index with emlx fallback) and terminal summary
inboxpie scan --source apple-mail

# Scan only Inbox and Sent folders, emit all report formats
inboxpie scan --folders "INBOX,Sent" --output all --report-dir ./reports

# Force Envelope Index only (faster when FDA is granted)
inboxpie scan --mode index --output json

# Force filesystem scan
inboxpie scan --mode emlx --output all

# Privacy mode (mask emails in terminal/HTML)
inboxpie scan --privacy --output all --report-dir ./reports

Privacy

InboxPie CLI reads only message metadata (sender, subject, date, folder, read status, size). It never reads or stores email body content. See PRIVACY.md for details.

Development

pip install -e ".[dev]"
pytest

Metadata

Release files for inboxpie 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inboxpie 1.0.3
File Size Uploaded
inboxpie-1.0.3.tar.gz 251.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inboxpie 1.0.3
File Interpreter ABI Platform
inboxpie-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 502.0 kB

Release files / inboxpie-1.0.3.tar.gz

Download URL inboxpie-1.0.3.tar.gz
Size 251.6 kB
Tags Source
SHA-256 checksum
How to use checksums
10bf31a3303d2da43a4d1b0df1d9aa68e9a1f11f41efa59ac3d6643c8b25632a
BLAKE2b-256 checksum
How to use checksums
b4f393185e1356da0918d26285a5ff6755fe8fb8f508e5795ca418b796077d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / inboxpie-1.0.3-py3-none-any.whl

Download URL inboxpie-1.0.3-py3-none-any.whl
Size 250.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfa5357836e6ee14944198a6bc9f665bcb99183d86731b05b35f53a243aecf4a
BLAKE2b-256 checksum
How to use checksums
ed5ed41b417c7f6e1f04033b90fb65788372045374ad5d1c6a58e98c42a968b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page