miel
Self-hosted Gmail client that ranks mail and suggests labels. Runs locally or in Docker under MIT, with AI through Claude Code or cloud APIs.

miel is a self-hosted Gmail client for people who want AI help sorting mail while keeping the app and its database on their own machine or server. It ranks messages by priority and proposes labels, including new ones. You review suggestions before applying changes to Gmail.
It connects to one or more Gmail accounts and supports batch labeling, archiving and trashing. You can edit AI-written reply drafts before sending them, browse existing Gmail filters and merge filters together. A command-line client covers mail sync, applying changes and replies without the web interface.
The app is open source under the MIT license and can run as a complete Docker stack with Postgres. It needs a Gmail account, your own Google OAuth client and AI provider credentials. Gmail access and AI requests depend on external services, so this isn't an offline email tool.
AI tasks can use Claude Code or the Anthropic, Google and OpenAI APIs, with a separate provider choice for each task. Running the Claude Code CLI locally doesn't mean the model runs on your hardware. The app and database stay under your control; AI requests send selected email content to the chosen provider.
For triage, that content is the sender, subject, snippet and label names. Claude Code can also retrieve a message body when it needs more context. Reply drafting and discount-code extraction from promotional mail send message body text to the AI provider.