mxr compose
Generated from
mxr compose --help. Edit the clap definitions incrates/daemon/src/cli/and re-runnpm run buildinsite/to regenerate.
Compose a new email
mxr compose [OPTIONS]Options
Section titled “Options”| 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>. 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 |
Use When
Section titled “Use When”Write a new message in $EDITOR or from stdin in scripts. --yes sends; --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 / pre-commit hooks.
Everyday Examples
Section titled “Everyday Examples”mxr compose --to alice@example.com --subject 'Friday'printf 'Approved' | mxr compose --to alice@example.com --subject 'Re: plan' --body-stdin --dry-runmxr compose --to alice@example.com --body 'Draft it.' --draft # saves, never sendsmxr compose --to alice@example.com --body 'see attached' --check --format json # warns: missing attachmentSee also
Section titled “See also”- CLI overview — full command index
- Concepts — query operators, search modes, JSON shapes
- Automation contract — which commands support
--format json,--dry-run, stdin