The mailcoded manual
This is the handbook for people who read their own mail with mailcoded, from a terminal. It covers installing it, adding an account, the full-screen client, every command-line verb, sending, and what to do when something goes wrong.
It is deliberately not the design documentation. If you want to know why the daemon speaks JSON-RPC or how the sync planner works, start at docs/ARCHITECTURE.md. If you are giving an AI agent access to your mail, docs/agents.md is the document for you; chapter 11 here only points at it.
Everything in this manual was checked against mailcoded 0.1.0, protocol 1, on 2026-09-06, by
running the commands. Where the manual and mailcoded help <verb> disagree, the program is right and
the manual has a bug — please report it.
The short version
scripts/install.sh # build, and put the four commands on PATH
mailcoded setup # add an account; nothing is saved until a real login succeeds
mailcoded tui # read it. Press ? for the keys.
Contents
- Installing — build from source, where the binaries go, checking it works
- Your first account —
setup, provider quirks, app passwords, Microsoft sign-in, scripted setup - Where your mail lives — the data directory, what is in it, secrets, backups, editors
- The terminal client —
mailcoded tui: the screen, keys, mouse, reading, triage, compose - Reading and searching from the command line —
search,read,thread,attachments,folders - Triage — Tags and Flags,
tag,move,archive, and why there is no delete - Sending — drafts, the two-phase send, the outbox, and who the send gate applies to
- Accounts —
account list,test,reauth,add,forget - Sync and the daemon —
sync, live updates, one daemon per store, running the daemon yourself - Importing mail and raw SQL —
import-eml,query --sql, reading the audit trail - Agents — the two-minute version, and where the real document is
- The safety model, in plain terms — what mailcoded will never do, and why you may see �
- Troubleshooting — the messages you might see, what they mean, what to do
- Reference — environment variables, exit codes, every key, every verb, every file
Conventions
mailcodedis the command-line tool.mailcoded-tui,mailcoded-daemonandmailcoded-mcpare the other three binaries the installer puts beside it; you rarely run them directly.<id>is a local message id — the number in the first column ofsearchoutput. It is stable within one store and means nothing outside it.- The vocabulary is deliberate and the manual sticks to it: an account has folders (never
“mailboxes”); a message carries server Flags (
unread,flagged,replied,draft) and local Tags (never “labels”). --jsonoutput is a contract, versioned byschema_version. The human-readable output is not, and may change between releases.