Skip to content

Repository files navigation

Email Cleaner

CI

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.

Project status

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.

The easiest install

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.

Native installation

Codex

codex plugin marketplace add EveryInc/email-cleaner
codex plugin add email-cleaner@email-cleaner

Start a new task and say: “Review my last 60 days of email and create future cleanup rules.”

Claude Code

/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.”

Email sources

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.

Review controls

  • B — add future mail from the root domain to the Block policy
  • S — skip the domain and leave it untouched
  • J / K — next / previous
  • Z — undo
  • / — search
  • F — 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.

Outputs

  • email-policy.json — provider-neutral source of truth
  • rule-review.csv — human-readable audit
  • gmail-filters.xml — bulk Gmail filter import
  • email-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.

Privacy model

  • 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.

Honest compatibility boundary

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.

Development

npm install
npm test
npm run validate
claude plugin validate . --strict

The shared app and workflow live in plugins/email-cleaner/. Codex and Claude load the same skill instead of maintaining separate behavior.

License

MIT

About

Provider-neutral email review and future-mail cleanup for AI agents

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages