Mild helps you manage a Gmail inbox from a machine you own.
- Labels. Say what you want from your inbox, a language model suggests labels from that, and you keep the ones that fit. Each label takes its mail out of your way: archive it, mark it spam, block the sender.
- Leave in inbox. Mail no label fits, and anything you said you never want to miss, stays where it is.
- Rules say what mail is, or what to do with it, without asking the model. Where you keep giving one sender's mail a different action than its label's, Mild proposes the rule.
It suggests before it acts. Every decision appears in a dashboard for you to correct, and until you turn Mild on it changes Gmail only for mail you answer there yourself. It never deletes mail. It sends only what you write and press Send on, with Inbox on and your leave, and never anything by itself. A change to a message can be undone; an unsubscribe cannot.
Status: early. In use on one real inbox, not yet turned on. Open work is in TODO.md.
Needs Node 26 and pnpm.
pnpm install
pnpm mild initinit walks through three steps, and can be run again to change any of them:
- An encryption key for the Google and model credentials Mild stores. It is saved as
MILD_KEYin.envin the directory you raninitfrom, not in Mild's home, so a copy of the home does not carry its own key. Start Mild from that directory. - Where Mild runs: this machine, or a server you reach from another one. Google signs people in only at
localhostor an HTTPS address, so on a serverinitturns ontailscale serve. - A Google OAuth client of your own, so Mild reads your mail with nobody in between.
initlinks each Google Cloud page in turn with the values to enter, and you paste the client's JSON back.
Everything else Mild keeps, its settings and its database included, is in ~/.config/mild; docs/cli.md lists it. There is no database server to run.
pnpm mild runOpen the address it prints and sign in with Google; that connects your Gmail account. The dashboard then walks you through the rest: connect a model (a ChatGPT subscription or an API key), say what you want, choose your labels, and have Mild go through recent mail for you to answer if you like. Mild reads nothing from Gmail until you have a label of your own, and from then on handles mail as it arrives.
It also runs in a container (docs/docker.md) and on Vercel (docs/vercel.md).
- docs/dashboard.md: what each screen is for, what Mild leaves in Gmail, and working on the page.
- docs/cli.md: the commands, their options, and the files Mild keeps.
- docs/deploy.md: upgrading, backing up and restoring.
- docs/secrets.md: the encryption key, and replacing it.
- docs/security.md: how one person's mail is kept from anyone else.
- docs/architecture.md: how it decides, and why it is built this way.
- docs/runtime.md: how one codebase runs as one process or as functions.
- AGENTS.md: the rules for changing it.
pnpm checkis the gate.