Email Cleaner is a keyboard-first, privacy-minded review app that works with capable local AI agents and multiple email providers. It inventories recent unread message metadata, lets you make one decision per domain, and generates portable future-mail policies without changing the mailbox during review.
This is experimental open-source software, not an actively supported product. It is provided as-is with no promise of maintenance, security monitoring, vulnerability response, fixes, updates, or response times. Use it entirely at your own risk. See SECURITY.md and the MIT License for details.
Paste this into a coding agent that can access GitHub, run local commands, and open a browser:
Set up and run Email Cleaner from https://github.com/EveryInc/email-cleaner. Keep all mailbox access read-only until I finish reviewing.
The repository includes agent-neutral instructions plus native packaging for Codex and Claude Code. Other agents can follow AGENTS.md and the shared SKILL.md directly.
codex plugin marketplace add EveryInc/email-cleaner
codex plugin add email-cleaner@email-cleanerStart a new task and say: “Review my last 60 days of email and create future cleanup rules.”
/plugin marketplace add EveryInc/email-cleaner
/plugin install email-cleaner@email-cleaner
Run /reload-plugins, then say: “Review my last 60 days of email and create future cleanup rules.”
| Source | Best for | Mailbox writes during inventory |
|---|---|---|
| Native AI email connector | Gmail, Outlook, or another provider already connected to the agent | None |
| Read-only IMAP | Most traditional email providers and custom domains | None |
| Canonical metadata JSONL | Provider APIs, local exports, or custom integrations | None |
IMAP credentials are set by the user in their own local shell and are never entered into the review app or committed to the repository. Proton Mail users can connect through Proton Mail Bridge.
B— add future mail from the root domain to the Block policyS— skip the domain and leave it untouchedJ/K— next / previousZ— undo/— searchF— switch between unreviewed, all, and decided domains
Each card also accepts a plain-English exception such as “keep receipts and password resets.” The AI translates those notes into narrow, reviewable provider-neutral conditions before export.
email-policy.json— provider-neutral source of truthrule-review.csv— human-readable auditgmail-filters.xml— bulk Gmail filter importemail-cleaner.sieve— rules for providers supporting Sieve
The review and export stages make no mailbox changes. Installing the resulting policy is a separate provider-specific step. Gmail supports XML imports; many hosted and self-managed providers support Sieve; other providers can translate email-policy.json through their API or connector.
- Only headers and metadata are inventoried; message bodies are not read.
- Runtime data lives in
.mailroom/with owner-only permissions. - In Git worktrees,
.mailroom/is added to the local exclude file without modifying the project. - The review server binds only to
127.0.0.1. - Passwords and tokens never belong in chat, fixtures, generated policy files, or commits.
- The public repository contains fictional fixtures only.
A pasted GitHub link is sufficient for an AI agent that can clone repositories, run Node.js, access email through a connector or locally configured IMAP, and open a local browser. A chat-only model cannot gain mailbox or computer access from a link alone. IMAP provides broad read-only inventory compatibility, but it is not a universal server-side filtering API; final enforcement still uses a provider adapter.
npm install
npm test
npm run validate
claude plugin validate . --strictThe shared app and workflow live in plugins/email-cleaner/. Codex and Claude load the same skill instead of maintaining separate behavior.
MIT