tokf is a Rust CLI that intercepts command output and compresses it using TOML-defined filters. You can strip passing tests, collapse repetitive errors, trim stack traces, etc.
The tricky part was making it work with build orchestrators. Hooking `just test` doesn't help if the noisy output comes from the `cargo test` that just runs internally. I ended up solving this three different ways depending on the tool:
- make/just: use their --shell flag to route execution through tokf - git hooks / other tools: prepend a shim directory to PATH
Wrote up the full rabbit hole: https://pecan.si/posts/getting-into-make-just-and-hooks/
Built in Rust, ~1,800 daily executions in my workflow. Filters are TOML with a Lua escape hatch. Open source: https://tokf.net