Skip to content

v0.3.0

Latest

Choose a tag to compare

@alfranz alfranz released this 18 Oct 16:20
efec0f6

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, && and ; 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 --label or label: in .hush.yaml do not change. A passing run now costs a few more tokens.
  • Warnings on success (#8, thanks @gmnstr). --warn-pattern and --warn-tail print ⚠ when a passing command prints matching lines. The exit code stays 0. .hush.yaml supports warn-pattern and warn-tail in defaults and per check.
    $ hush --warn-pattern WARN "echo 'WARN: old api'"
    ⚠ echo 'WARN: old api' (1 warning)
    WARN: old api
    
  • hush all uses the check settings (#17). Before, it ignored the per-check label, grep, tail, head and warning settings, ignored tail, head and grep in defaults, and ran the checks in random order. Now it runs them in file order, with the same settings as hush <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 --version and -v (#12). They print hush 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 hush binary (#15).
  • go run ./benchmark measures 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 with error[rule]:, so the pattern matched nothing. The docs now use "^error" (#18). Please update your .hush.yaml if 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

  • @gmnstr made their first contribution in #8

Full Changelog: v0.2.0...v0.3.0