OTO
reference · oto rules --help at v0.6.1

oto rules

validate, dry-run, diff and accept the rules over the graph

oto rules [-h] [--project PROJECT] [--show SHOW] [--strict]
                 [{check,diff,accept,explain}] [rule_id]

Verbs

  • check validates and dry-runs
  • diff compares with the accepted set
  • accept records it
  • explain <id> prints a rule's reason, its pattern and what it did on the last build

rule_id for explain: the rule to explain (none: one line per rule)

Options

OptionWhat it does
--project PROJECTproject root (default: current directory)
--show SHOWhow many items to list per section
--strictfor diff: exit non-zero on a breaking change

Where to use it

You wrote a rule. What would it derive, and is it valid?

oto rules check --project claims

validates every rule and dry-runs it over the graph

Before accepting a changed rule set.

oto rules diff --project claims
oto rules accept --project claims

compares with the accepted set, then records it

Why does this derived fact exist?

oto rules explain --project claims r-adjuster-authority

the rule's reason, its pattern and what it did on the last build

As the terminal prints it
usage: oto rules [-h] [--project PROJECT] [--show SHOW] [--strict]
                 [{check,diff,accept,explain}] [rule_id]

positional arguments:
  {check,diff,accept,explain}
                        check validates and dry-runs; diff compares with the accepted set; accept
                        records it; explain <id> prints a rule's reason, its pattern and what it
                        did on the last build
  rule_id               for explain: the rule to explain (none: one line per rule)

options:
  -h, --help            show this help message and exit
  --project PROJECT     project root (default: current directory)
  --show SHOW           how many items to list per section
  --strict              for diff: exit non-zero on a breaking change