Skip to content

mxr compose

Generated from mxr compose --help. After editing crates/daemon/src/cli/, update and review the snapshots with scripts/cargo-test -p mxr --test integration cli_help::, then rebuild site/.

Compose a new email

mxr compose [OPTIONS] [COMMAND]
Subcommand Purpose
models List models available to compose under compose routing and privacy policy
assist Ask for writing help and read the proposal. Nothing in the draft changes until you accept it with mxr compose apply
apply Write an accepted proposal into a stored draft. Refused if the draft’s text has changed since the proposal was made. Signature and forward header stay as they are
help Print this message or the help of the given subcommand(s)
Flag Description
--to <TO> Recipient(s), comma-separated
--cc <CC> CC recipient(s)
--bcc <BCC> BCC recipient(s)
--subject <SUBJECT> Subject line
--body <BODY> Message body as string
--body-stdin Read message body from stdin
--html-file <PATH> Send this HTML file as the message body, preserved exactly. mxr does not reformat, wrap, minify, or sanitise it — tables, inline CSS, <style> blocks, media queries and Outlook conditional comments all survive. Dangerous active content (scripts, forms, javascript: URLs) is reported and refused rather than stripped. Mutually exclusive with the markdown body flags
--html-stdin Read the HTML body from stdin. Same rules as --html-file
--text-file <PATH> Plain-text alternative for an HTML body. Without it mxr generates one from the HTML deterministically; the HTML is never altered either way
--inline <CID=PATH> Attach an image as a CID-referenced inline asset, as --inline NAME=PATH, so the HTML can use <img src="cid:NAME">. Repeatable. Requires an HTML body
--signature-html <PATH> Append this HTML file to an HTML body before </body>. Signatures are never injected into supplied HTML automatically — pass this to opt in. Markdown composition is unaffected
--attach <ATTACH> File path to attach (repeatable)
--from <FROM> Account to send from, or an owned address to send as. Accepts an account name/key, the account’s primary email, or any registered alias (mxr accounts addresses); an alias sets both the account and the From address. When one alias is registered on several accounts, disambiguate with --account
--account <ACCOUNT> Disambiguate which account to send from when --from names an address registered on more than one account
--signature <SIGNATURE> Insert this signature by name instead of the scoped default. Markdown bodies only: a named signature is never spliced into a supplied HTML document, so pairing this with --html-file / --html-stdin would accept the flag and do nothing. Append a signature to an HTML body with --signature-html instead
--no-signature Do not insert any signature. Stays legal alongside an HTML body: it asks for the behaviour an HTML compose already has, so honouring it silently is honest. --signature-html is what it conflicts with
--yes Skip confirmation prompt
--draft Save as a draft instead of sending. Never transmits; the message lands in mxr drafts and is sent later with mxr send <draft-id> --expected-revision <reviewed-revision> --expected-workspace '<owner-json>'. Mutually exclusive with --yes, so no added flag can turn a draft into a send
--dry-run Show what would be sent without sending
--format <FORMAT> [possible values: table, json, jsonl, csv, ids]
--check Build a transient draft from these args and run the pre-send safety pipeline against it without sending or saving. Exit non-zero only on Blocker issues. Useful for CI/pre-commit hooks: pipe a body in and assert the JSON report
--no-llm With --check: skip LLM-backed checks (answer-coverage). Has no effect on a real send
-h, --help Print help

Write a new message in $EDITOR or from stdin in scripts. --yes sends; before submission it prints the operation ID and recovery query to stderr. Rerunning a one-shot command creates a new draft, so query that ID after an uncertain response. --draft saves to mxr drafts without sending (the two are mutually exclusive, so no added flag can turn a draft into a send). Add --check to run the pre-send safety pipeline against a transient draft built from these flags, useful in CI or pre-commit hooks. For a saved draft, preview it with mxr send DRAFT_ID --dry-run --format json, then send with --expected-revision REVISION_FROM_PREVIEW, --operation-id OPERATION_ID_FROM_PREVIEW and --expected-workspace '<OWNER_JSON_FROM_PREVIEW>'. Use that same quoted owner for mxr send-outcome and for scheduling with --at TIME.

Terminal window
mxr compose --to alice@example.com --subject 'Friday'
printf 'Approved' | mxr compose --to alice@example.com --subject 'Re: plan' --body-stdin --dry-run
mxr compose --to alice@example.com --body 'Draft it.' --draft # saves, never sends
mxr compose --to alice@example.com --body 'see attached' --check --format json # warns: missing attachment

Write an accepted proposal into a stored draft. Refused if the draft’s text has changed since the proposal was made. Signature and forward header stay as they are

mxr compose apply [OPTIONS] --draft <DRAFT_ID> <PROPOSAL_ID>
Flag Description
<PROPOSAL_ID> Proposal id from mxr compose assist; proposals last 30 minutes
Flag Description
--draft <DRAFT_ID> The stored draft to write into
--format <FORMAT> [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Ask for writing help and read the proposal. Nothing in the draft changes until you accept it with mxr compose apply.

With nothing typed the model writes the message; with text it finishes it, keeping your sentences and adding what the message still needs (greeting, sign-off, an answer to each question you haven’t covered); with a selection it rewrites only that part. Anything only you can decide comes back as a [[?: ...]] gap, and a draft with a gap can’t be sent. Calls your LLM once; takes as long as the model does.

mxr compose assist [OPTIONS] <--draft <DRAFT_ID>|--reply-to <MESSAGE_ID>|--forward <MESSAGE_ID>|--new>
Flag Description
--draft <DRAFT_ID> Help with a stored draft. Its text is used unless --text is given
--reply-to <MESSAGE_ID> Help with a reply to this message
--all With --reply-to: the reply goes to everyone
--forward <MESSAGE_ID> Help with a note forwarding this message; needs --to
--new Help with a new message; needs --account, --to and --subject
--account <ACCOUNT> With --new: the account to write from (name, email or id)
--to <TO> With --forward or --new: who it goes to (comma-separated or repeated)
--subject <SUBJECT> With --new: the subject line
--text <PATH> The text you have typed so far: a file path, or - for stdin. Only your own text, with no signature or forward header. Empty or absent means nothing typed (except with --draft, which reads the stored draft)
--select <START..END> Work on part of the text only, as byte offsets START..END that fall between whole characters
--write Write the whole message, ignoring any text
--finish Keep what is typed and add what the message still needs
--polish Fix and tighten what is typed without adding to it
--instruction <TEXT> What you want said or changed, in your words
--model <MODEL_ID> Use one configured model for this draft only
--revise <PROPOSAL_ID> Revise an earlier proposal: the instruction is applied to it. Your own text stays what --text (or the stored draft) says
--shorter Make it shorter
--warmer Make it warmer
--formal Make it more formal
--proofread Fix typos, spelling and grammar only
--format <FORMAT> [possible values: table, json, jsonl, csv, ids]
-h, --help Print help (see a summary with ‘-h’)

List models available to compose under compose routing and privacy policy

mxr compose models [OPTIONS]
Flag Description
--format <FORMAT> [possible values: table, json, jsonl, csv, ids]
-h, --help Print help