docs/use/). Load llms.txt, then catalog.json and commands.json. Open a markdown page only when you need the steps.
mailkit init-skill installs a bundled skill into some coding agents. This user guide is the public, provider-current source. Prefer it when both exist.
Operating loop
mailkit --version— this guide matches 0.4.0.mailkit auth list— note provider tags.- If empty: setup.md. You will need a human for Google consent, a Fastmail token, or a Bridge password.
mailkit auth doctor --jsonbefore a batch of reads if the account might be stale.- Read with
--json. Organize with ids from those results, or-qafter you have shown the human the match. - Draft freely. Send only after the send ritual below.
Send ritual (required)
Before everymailkit send:
- Show To, Cc, Subject, Body, attachment names.
- Get an unambiguous yes for this payload.
- Run
mailkit send … --yes. - Never add
--yesbecause a draft exists.
--yes the CLI already refuses. That is not a substitute for the human yes.
Secrets
- Do not echo Fastmail tokens or Bridge mailbox passwords.
- Do not pass them as flags or positional args.
- Do not write them into the repo, tickets, or chat logs.
- OAuth client JSON goes through
mailkit auth set-client <file>only.
Provider routing
Readcommands.json → providers and each command’s providers list. Do not call Gmail-only verbs on Fastmail or Proton Mail. Do not call send on Fastmail.
Queries
On Fastmail and Proton Mail, onlyfrom:, from:(a OR b), -from:, in:inbox. If you need is:unread, use mailkit read --unread instead of stuffing that token into search.
Bulk organize
For-q that could match many messages: mailkit search first, report the count, confirm the scope, then run archive/trash/label.
Cron
Unattended jobs may read, doctor, organize, and draft. They must never callsend.