mxr rules
Generated from
mxr rules --help. After editingcrates/daemon/src/cli/, update and review the snapshots withscripts/cargo-test -p mxr --test integration cli_help::, then rebuildsite/.
Manage rules
mxr rules [OPTIONS] [COMMAND]Subcommands
Section titled “Subcommands”| 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) |
Options
Section titled “Options”| Flag | Description |
|---|---|
--format <FORMAT> |
[possible values: table, json, jsonl, csv, ids] |
-h, --help |
Print help |
Use When
Section titled “Use When”Create deterministic filing/mutation rules and dry-run them before enabling.
Everyday Examples
Section titled “Everyday Examples”mxr rules validate --when 'from:billing@example.com' --then 'label:receipts'mxr rules dry-run --all --after 2026-01-01Sub-subcommands
Section titled “Sub-subcommands”mxr rules add
Section titled “mxr rules add”mxr rules add [OPTIONS] --when <CONDITION> --then <ACTION> <NAME>Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
<NAME> |
Options
Section titled “Options”| Flag | Description |
|---|---|
--account <ACCOUNT> |
|
--when <CONDITION> |
|
--then <ACTION> |
|
--priority <PRIORITY> |
[default: 100] |
-h, --help |
Print help |
mxr rules category-apply
Section titled “mxr rules category-apply”Save or delete a category rule and apply its unchanged preview
mxr rules category-apply [OPTIONS] --preview-token <PREVIEW_TOKEN> [RULE]Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
[RULE] |
Options
Section titled “Options”| Flag | Description |
|---|---|
--form <FORM> |
|
--preview-token <PREVIEW_TOKEN> |
|
--delete |
|
-h, --help |
Print help |
mxr rules category-preview
Section titled “mxr rules category-preview”Preview the complete category-rule reconciliation, including old contributions
mxr rules category-preview [OPTIONS] [RULE]Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
[RULE] |
Options
Section titled “Options”| Flag | Description |
|---|---|
--form <FORM> |
|
--delete |
|
-h, --help |
Print help |
mxr rules delete
Section titled “mxr rules delete”mxr rules delete <RULE>Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
<RULE> |
Options
Section titled “Options”| Flag | Description |
|---|---|
-h, --help |
Print help |
mxr rules disable
Section titled “mxr rules disable”mxr rules disable <RULE>Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
<RULE> |
Options
Section titled “Options”| Flag | Description |
|---|---|
-h, --help |
Print help |
mxr rules dry-run
Section titled “mxr rules dry-run”mxr rules dry-run [OPTIONS] [RULE]Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
[RULE] |
Options
Section titled “Options”| Flag | Description |
|---|---|
--all |
|
--after <AFTER> |
|
-h, --help |
Print help |
mxr rules edit
Section titled “mxr rules edit”mxr rules edit [OPTIONS] <RULE>Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
<RULE> |
Options
Section titled “Options”| Flag | Description |
|---|---|
--name <NAME> |
|
--when <CONDITION> |
|
--then <ACTION> |
|
--priority <PRIORITY> |
|
--enable |
|
--disable |
|
-h, --help |
Print help |
mxr rules enable
Section titled “mxr rules enable”mxr rules enable <RULE>Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
<RULE> |
Options
Section titled “Options”| Flag | Description |
|---|---|
-h, --help |
Print help |
mxr rules form
Section titled “mxr rules form”Export the complete editable RuleFormData JSON for preview/apply
mxr rules form <RULE>Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
<RULE> |
Options
Section titled “Options”| Flag | Description |
|---|---|
-h, --help |
Print help |
mxr rules history
Section titled “mxr rules history”mxr rules history [OPTIONS] [RULE]Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
[RULE] |
Options
Section titled “Options”| Flag | Description |
|---|---|
--limit <LIMIT> |
[default: 50] |
-h, --help |
Print help |
mxr rules list
Section titled “mxr rules list”mxr rules listOptions
Section titled “Options”| Flag | Description |
|---|---|
-h, --help |
Print help |
mxr rules show
Section titled “mxr rules show”mxr rules show <RULE>Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
<RULE> |
Options
Section titled “Options”| Flag | Description |
|---|---|
-h, --help |
Print help |
mxr rules treatment-apply
Section titled “mxr rules treatment-apply”Apply exactly a sorting preview, rejecting changed mail or rules
mxr rules treatment-apply [OPTIONS] [RULE] [TOKEN]Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
[RULE] |
|
[TOKEN] |
Options
Section titled “Options”| 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 |
mxr rules treatment-preview
Section titled “mxr rules treatment-preview”Preview a saved rule or an unsaved JSON form; returns the token Apply requires
mxr rules treatment-preview [OPTIONS] [RULE]Arguments
Section titled “Arguments”| Flag | Description |
|---|---|
[RULE] |
Options
Section titled “Options”| Flag | Description |
|---|---|
--form <FORM> |
RuleFormData JSON file, or - for stdin. Does not save the draft |
-h, --help |
Print help |
mxr rules validate
Section titled “mxr rules validate”mxr rules validate --when <CONDITION> --then <ACTION>Options
Section titled “Options”| Flag | Description |
|---|---|
--when <CONDITION> |
|
--then <ACTION> |
|
-h, --help |
Print help |
See 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