Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

14. Reference

← Contents

Environment variables

VariableRead byEffect
MAILCODED_DATA_DIRallthe data directory (chapter 3); --data-dir and --db override it
MAILCODED_DBmailcoded-mcpthe path to store.db when --db is not passed
MAILCODED_DAEMONmailcoded-tuiwhich mailcoded-daemon executable to start; mailcoded tui sets it to the sibling it found
MAILCODED_SENDCLI, MCP1, true or yes opens the agent-surface send gate
MAILCODED_APPROVED_RECIPIENTSCLI, MCPaddresses and @domain or *@domain patterns every recipient must match; empty approves nobody
MAILCODED_ENABLE_SQLCLI1 enables query --sql
MAILCODED_ALLOW_MOVECLI1, true or yes; required for move and archive on the CLI at all. A terminal still confirms; --yes skips the prompt
MAILCODED_ALLOW_FORGETCLIthe same, for account forget --yes
MAILCODED_SECRET_BACKENDallauto (default), file, libsecret, keychain, wincred
MAILCODED_SECRET_KEYalla passphrase for the encrypted-file vault, instead of the machine key
MAILCODED_SECRET_KEY_FILEalla file holding that passphrase
MAILCODED_OAUTH_CLIENT_IDallyour own Microsoft public-client application id
MAILCODED_OAUTH_TENANTallcommon (default), consumers, organizations, or a tenant GUID
MAILCODED_AGENT_HOSTCLI, MCPa label recorded on every audit row
MAILCODED_MCP_LOGmailcoded-mcpits stderr log level

MAILCODED_TRANSCRIPT and MAILCODED_PARENT_PID are used by the test suite and between the hosts; they are not for users.

Exit codes and RPC error codes

ExitRPC
0success
1internal error
2-32602validation; invalid params
31002not found
41006forbidden — a gate refused
51005rate limited
61003confirm required
71000auth
81001network
91004, 1007store corrupt; store full
101008unsupported
130cancelled

mailcoded-tui exits 0, or 2 (the console cannot render ANSI), 3 (the daemon went away, or --check failed), 4 (the daemon refused the connection).

Every key in the TUI

Everywhere? help · ctrl-l redraw · ctrl-c quit · esc cancel the innermost thing.

Sidebar and message list

j k move
g G Home Endfirst, last
space PgDn PgUpa page
ctrl-d ctrl-uhalf a page
nthe next 100 messages
tab h l switch pane; in the sidebar h and l fold
enteropen the folder; read the message
/search; esc clears it
rsync this folder
ccompose
ppreview pane on or off
u f t a m Tunread, flagged, tags, archive, move, thread
A S otest the account, status, outbox
qquit

Reader — the scroll keys above · r R reply, reply to all · u f t a m T as above · s then a digit to save an attachment · q or esc back.

Move pickerj k choose · enter move here · esc cancel.

Composertab shift-tab field · enter a new line in the body, otherwise the next field · arrows home end backspace edit · ctrl-s preview · esc or ctrl-c discard, after a y/n.

ConfirmationY sends · anything else goes back.

Help, status, outbox — any key closes.

Mouse, on Linux and macOS — click to select · double-click to open · wheel to scroll · click a key-bar entry · shift for the terminal’s own selection.

The verbs

setupadd an account, interactively
search '<query>'search the local store
read <id>one message, as plaintext
thread <id|key>one conversation
attachments <id> [--save <n>]list them, or save one
tag <id> +a -bTags and Flags
move <id> --folder <f>move on the server, confirmed
archive <id>move to Archive, confirmed
foldersfolders with counts
stats, healthcounters; state
tuithe terminal client
draft, reply <id>build a draft
send-preview <draft>preview, and mint the token
send-draft <draft> --confirm-token <t>send
outboxqueued, sending, sent, failed
account list, test, reauth, add, forgetaccounts
syncpull changes
import-eml <dir>load .eml files
query --sqlread-only SQL, gated
version, help [verb]

Global options: --json, --data-dir <path>, --db <path>, --quiet, --help.

Files in the data directory

store.db with -wal and -shm · blobs/ · secrets.enc, and on Linux and macOS secrets.key · daemon.lock · daemon.owner — chapter 3.

Versions

This manual describes mailcoded 0.1.0, JSON-RPC protocol 1, CLI output schema 1 — what mailcoded version prints.