mxr archive
Generated from
mxr archive --help. After editingcrates/daemon/src/cli/, update and review the snapshots withscripts/cargo-test -p mxr --test integration cli_help::, then rebuildsite/.
Archive a message (remove from inbox)
mxr archive [OPTIONS] [MESSAGE_ID]...Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
[MESSAGE_ID] |
… Message ID(s). If omitted, reads IDs from stdin when stdin is piped |
Options
Section titled “Options”| Flag | Description |
|---|---|
--search <SEARCH> |
Operate on the newest messages matching a search query, up to 1,000. The command says before acting when more than 1,000 match; add –all to act on every match |
--account <ACCOUNT> |
|
--yes |
Skip confirmation |
--dry-run |
Show what would happen |
--async |
Submit in the background; query the retained ID with mxr archive-operation |
--all |
Act on every message the search matches, not only the newest 1,000. The daemon resolves the whole set, so the exact count is shown before anything changes, and runs it as one background job that this command waits for. An –all job cannot be undone: preview it with –dry-run first, since the preview is the check |
--no-wait |
With –all, return once the daemon has accepted the job instead of waiting for it. Follow it with mxr jobs <JOB_ID> |
--preview-token <TOKEN> |
With –all, run exactly the messages an earlier --all --dry-run counted (its preview_token; valid for 10 minutes, once) |
--format <FORMAT> |
Output format: table, json, jsonl, ids |
-h, --help |
Print help |
Use When
Section titled “Use When”Clear mail from the inbox without deleting it. Always dry-run bulk queries first.
Everyday Examples
Section titled “Everyday Examples”mxr archive MESSAGE_IDmxr archive --search 'label:newsletters older_than:30d' --dry-runSee 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