Skip to content

mxr rules

Generated from mxr rules --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/.

Manage rules

mxr rules [OPTIONS] [COMMAND]
Subcommand Purpose
form Export the complete editable RuleFormData JSON for preview/apply
category-preview Preview the complete category-rule reconciliation, including old contributions
category-apply Save or delete a category rule and apply its unchanged preview
treatment-preview Preview a saved rule or an unsaved JSON form; returns the token Apply requires
treatment-apply Apply exactly a sorting preview, rejecting changed mail or rules
help Print this message or the help of the given subcommand(s)
Flag Description
--format <FORMAT> [possible values: table, json, jsonl, csv, ids]
-h, --help Print help

Create deterministic filing/mutation rules and dry-run them before enabling.

Terminal window
mxr rules validate --when 'from:billing@example.com' --then 'label:receipts'
mxr rules dry-run --all --after 2026-01-01
mxr rules add [OPTIONS] --when <CONDITION> --then <ACTION> <NAME>
Flag Description
<NAME>
Flag Description
--account <ACCOUNT>
--when <CONDITION>
--then <ACTION>
--priority <PRIORITY> [default: 100]
-h, --help Print help

Save or delete a category rule and apply its unchanged preview

mxr rules category-apply [OPTIONS] --preview-token <PREVIEW_TOKEN> [RULE]
Flag Description
[RULE]
Flag Description
--form <FORM>
--preview-token <PREVIEW_TOKEN>
--delete
-h, --help Print help

Preview the complete category-rule reconciliation, including old contributions

mxr rules category-preview [OPTIONS] [RULE]
Flag Description
[RULE]
Flag Description
--form <FORM>
--delete
-h, --help Print help
mxr rules delete <RULE>
Flag Description
<RULE>
Flag Description
-h, --help Print help
mxr rules disable <RULE>
Flag Description
<RULE>
Flag Description
-h, --help Print help
mxr rules dry-run [OPTIONS] [RULE]
Flag Description
[RULE]
Flag Description
--all
--after <AFTER>
-h, --help Print help
mxr rules edit [OPTIONS] <RULE>
Flag Description
<RULE>
Flag Description
--name <NAME>
--when <CONDITION>
--then <ACTION>
--priority <PRIORITY>
--enable
--disable
-h, --help Print help
mxr rules enable <RULE>
Flag Description
<RULE>
Flag Description
-h, --help Print help

Export the complete editable RuleFormData JSON for preview/apply

mxr rules form <RULE>
Flag Description
<RULE>
Flag Description
-h, --help Print help
mxr rules history [OPTIONS] [RULE]
Flag Description
[RULE]
Flag Description
--limit <LIMIT> [default: 50]
-h, --help Print help
mxr rules list
Flag Description
-h, --help Print help
mxr rules show <RULE>
Flag Description
<RULE>
Flag Description
-h, --help Print help

Apply exactly a sorting preview, rejecting changed mail or rules

mxr rules treatment-apply [OPTIONS] [RULE] [TOKEN]
Flag Description
[RULE]
[TOKEN]
Flag Description
--form <FORM> The unchanged RuleFormData JSON file, or - for stdin
--preview-token <PREVIEW_TOKEN> Token from a draft preview (saved rules may pass it positionally)
-h, --help Print help

Preview a saved rule or an unsaved JSON form; returns the token Apply requires

mxr rules treatment-preview [OPTIONS] [RULE]
Flag Description
[RULE]
Flag Description
--form <FORM> RuleFormData JSON file, or - for stdin. Does not save the draft
-h, --help Print help
mxr rules validate --when <CONDITION> --then <ACTION>
Flag Description
--when <CONDITION>
--then <ACTION>
-h, --help Print help