Repository navigation
Important fix
Before this release, hush dropped every argument after the first word unless the whole command was quoted. hush ls /nonexistent ran only ls, printed ✓ ls and exited 0. hush make check ran plain make and reported ✓ while the tests failed.
Now hush runs the whole command:
$ hush ls /nonexistent
✗ ls /nonexistent
ls: /nonexistent: No such file or directory
If you or your agents call hush without quotes, please update.
Breaking changes
Hush flags go before the command (#10). The first argument that is not a flag starts the command. Everything after it belongs to the command. This also fixes hush go test -race ./..., which failed with unknown shorthand flag: 'r'.
hush --label check "make check" # works
hush "make check" --label check # now an error
The error says what to do:
hush: "make check" looks like a quoted command, but more arguments follow it: ["--label" "check"]
Put hush flags before the command: hush [flags] "<command>"
The batch --label flag is an error (#11). Before, hush ignored it without a message. One label cannot name several commands. Use named checks in .hush.yaml to name each command.
Output of a single command is no longer indented (#19). batch and all still indent each command's output by 2 spaces. Update scripts that expect the indent.
Changes
- Two command forms (#10). One quoted argument runs with
sh -c, so pipes,&∧work. Several arguments run the program directly, with the arguments as given. A missing program exits 127, like a shell. - Labels show the whole command (#11):
✗ go test ./...instead of✗ go. Hush removes the program's directory, collapses whitespace and cuts the label to 40 characters. Labels set with--labelorlabel:in.hush.yamldo not change. A passing run now costs a few more tokens. - Warnings on success (#8, thanks @gmnstr).
--warn-patternand--warn-tailprint⚠when a passing command prints matching lines. The exit code stays 0..hush.yamlsupportswarn-patternandwarn-tailindefaultsand per check.$ hush --warn-pattern WARN "echo 'WARN: old api'" ⚠ echo 'WARN: old api' (1 warning) WARN: old api hush alluses the check settings (#17). Before, it ignored the per-checklabel,grep,tail,headand warning settings, ignoredtail,headandgrepindefaults, and ran the checks in random order. Now it runs them in file order, with the same settings ashush <check>.- Cheaper failure output (#19). Each indented line cost about one token. On a failure, hush output now costs 1–5% more than the raw output, only the
✗line. Before, it cost 9–10% more. - New flags
--versionand-v(#12). They printhush version 0.3.0.
Docs and development
- The docs site at https://alfranz.github.io/hush/ describes the two command forms, flag placement, the new labels and all flags (#15).
- The integration tests also run with Podman. Set
HUSH_CONTAINER_CLI=podman(#8). - The repository no longer contains a built
hushbinary (#15). go run ./benchmarkmeasures token savings on real projects with Claude's tokenizer (#18). The README and the docs site show the results.- The docs used
grep "error:"for ty, but ty errors start witherror[rule]:, so the pattern matched nothing. The docs now use"^error"(#18). Please update your.hush.yamlif you copied it.
What's Changed
- feat: add warning-aware success reporting and podman-ready integration tests by @gmnstr in #8
- fix: pass all arguments to the command, read hush flags only before it by @alfranz in #10
- fix: label results with the whole command, reject --label on batch by @alfranz in #11
- feat: add --version flag by @alfranz in #12
- test: use fixed labels in integration tests that check filtered output by @alfranz in #14
- docs: update site for new labels and command forms, remove binary by @alfranz in #15
- docs: add release process to CLAUDE.md, ignore notes.md by @alfranz in #16
- fix: make "hush all" use per-check settings and file order by @alfranz in #17
- feat: add a real token benchmark and fix doc claims by @alfranz in #18
- feat: print single-command output without indent by @alfranz in #19
New Contributors
Full Changelog: v0.2.0...v0.3.0