TOML rules
Most commands are compressed by a TOML rule rather than a hand-rolled
Rust filter. Rules are embedded into the binary at build time (zero runtime
cost) and live under apps/cli/src/rules/.
Built-in example
Section titled “Built-in example”[filter]name = "brew-install"commands = ["brew install", "brew upgrade"]strip_patterns = ["^==>.*Downloading", "^==>.*Pouring", "^🍺.*"]head_lines = 5tail_lines = 3empty_message = "ok"
[[assertions]]input = "==> Downloading\n==> Pouring foo\n🍺 foo installed"expected_contains = "ok"min_savings_pct = 60Project-local rules
Section titled “Project-local rules”Drop a TOML file under .tok0/filters/ in any project. The directory must be
explicitly trusted before tok0 will load custom rules:
tok0 trust .User-global rules go in ~/.config/tok0/filters/ and don’t require trust.