# behave

behave is a Claude Code MCP server that captures CLI execution outputs and verifies that rewrites or refactored tools match the original behaviour.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6 repo stars
- Author: emirmrkaljevic
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/emirmrkaljevic/behave
- Updated: 2026-11-15
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/behave

## What it does

behave inspects command-line binaries as black boxes by parsing man pages and `--help` output. It creates test cases with varying parameters, malformed inputs, and edge stdin data, recording exit codes alongside standard output and standard error.

The MCP interface exposes probing, recording, and differential validation over stdio. When comparing a rewrite against the reference binary, passing `--skip-tag meta` ignores intentional phrasing differences in version and help text.

All executions run inside fresh temporary folders. Tools modifying paths outside their working directory require an isolated sandbox or explicitly skipped flags.

## Requirements
- Needs: a prebuilt binary from the repository releases

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- record golden test baselines directly from existing command-line binaries
- detect behavioral discrepancies between a legacy CLI and a Rust or Go rewrite
- track differences in exit codes, stdout, and stderr during CLI refactoring
- generate test permutations automatically from man pages and help flags

## Example prompts
- Compare `./target/release/sort` against the recorded GNU sort baseline
- Probe `jq` behavior using sample arguments like `.` and `keys`
- Check `./uu/cut` compatibility against the recorded cut suite without checking help text

## Similar
- [replica-diff](https://affpapa.org/en/nevibecode/skills/replica-diff.md) — skill · 1600 installs
- [principle-prove-it-works](https://affpapa.org/en/nevibecode/skills/principle-prove-it-works.md) — skill · 10300 installs
- [independent-review](https://affpapa.org/en/nevibecode/skills/ronny-minimax-code-team-independent-review.md) — skill · ★ 741 repo stars
- [meticulous-simulate-and-diff](https://affpapa.org/en/nevibecode/skills/meticulous-simulate-and-diff.md) — skill · 9100 installs
- [behave-skill](https://affpapa.org/en/nevibecode/skills/behave-skill.md) — skill · 227 installs
- [fallow-review](https://affpapa.org/en/nevibecode/skills/fallow-review.md) — skill · 1000 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
