I wrote behave in Go to check whether a rewrite of a command line tool really behaves like the original.
It treats the tool as a black box: it reads --help and the man page, generates cases (flags, flag pairs, odd stdin, missing files, bad values), runs them and records stdout, stderr and the exit code into a spec file. Then it replays the spec against another binary and every difference shows up as a failing case.
Most of my use so far was comparing GNU coreutils, findutils, sed and procps with the uutils Rust rewrites. That turned into 44 upstream bug reports and 51 fix PRs, 34 of them merged by mid November.
Some details: every case runs in a fresh temp dir with a fixed environment and its own timeout, cases that change between runs are marked flaky and skipped, and built-in normalizers (plus your own regex rules) strip timestamps, pids and temp paths before comparing. The same binary also runs as an MCP server. Install with go install github.com/emirmrkaljevic/behave/cmd/behave@latest or from the Homebrew tap. MIT licensed.
Feedback on the spec format or the case generator is welcome.


