TOML Filters for JFrog Boost
Add custom JFrog Boost output filters with TOML filter rules.
JFrog Boost ships built-in filters for common tools. You can add custom filter rules in TOML for team scripts, deploy pipelines, and other noisy commands. For how Boost applies filters at runtime, see Token Savings with JFrog Boost.
Filter Locations
Boost merges filters from several locations:
- Built-in filters shipped with Boost (
make,terraform,shellcheck, and others) ~/.config/boost/filters.toml.boost/filters.tomlin your repository (commit this for team-wide rules)
Later files can add new filters; the first match_command regex that matches the command line wins at runtime.
Example 1: Custom Deploy Script
Your team runs ./scripts/deploy.sh through Boost (boost ./scripts/deploy.sh staging). The script prints hundreds of progress lines but only errors matter to the agent.
schema_version = 1
[filters.deploy]
description = "Keep failures from deploy.sh"
match_command = "^\\./scripts/deploy\\.sh\\b"
strip_ansi = true
keep_lines_matching = [
"^(ERROR|WARN|FAIL)",
"^\\s+at ",
]
max_lines = 80
on_empty = "deploy: ok"Before (raw output):
==> Resolving staging manifest…
==> Pulling image acme/web:staging
==> Waiting for rollout (1/3 ready)
==> Waiting for rollout (2/3 ready)
ERROR: pod api-7f9c failed readiness: connection refused
at deploy.sh:142 check_health
WARN: retry 1/3 in 5s
==> Rollout completeAfter Boost filter:
ERROR: pod api-7f9c failed readiness: connection refused
at deploy.sh:142 check_health
WARN: retry 1/3 in 5sExample 2: Strip make Chatter
make ChatterBuilt-in filters use the same schema. This mirrors the shipped make filter: drop entering or leaving directory lines and blank rows.
[filters.make]
match_command = "^make\\b"
strip_lines_matching = [
"^make\\[\\d+\\]:",
"^\\s*$",
"^Nothing to be done",
]
max_lines = 50
on_empty = "make: ok"Before (raw output):
make[1]: Entering directory '/home/user/app'
gcc -O2 -c src/main.c
gcc -O2 -o app src/main.o
make[1]: Leaving directory '/home/user/app'
After Boost filter
gcc -O2 -c src/main.c
gcc -O2 -o app src/main.o
Example 3: Short-Circuit on Clean Lint
Use match_output to return a one-line summary when the tool succeeded quietly.
[filters.eslint-quiet]
match_command = "^eslint\\b"
match_output = [
{ pattern = "0 problems", message = "eslint: ok" },
]Filter Fields
| Field | Purpose |
|---|---|
match_command | Required regex against the full command line |
strip_ansi | Remove terminal color codes first |
strip_lines_matching | Drop lines matching any pattern |
keep_lines_matching | Keep only matching lines |
truncate_lines_at | Cap each line length |
head_lines / tail_lines | Keep first or last N lines |
max_lines | Total line budget with ...+N more lines suffix |
match_output | Replace entire output when a pattern matches |
on_empty | Message when filtering removes everything |
Commands without a Go or TOML filter pass output through unchanged. For the complete field reference, see TOML_FILTERS.md on GitHub.
