Initialize.
Start with a local configuration. Review the commands before running them.
$ invar initA local behavioral guardrail for coding agents and their maintainers. Capture what works. Review it. Keep the next change honest.
Open source. Runs locally. Approval stays with you.
Built for the way you change code.
A refactor can change what your commands return. Invar compares each run with the examples you explicitly accepted.
An ordering example, inspired by the repository demo. Select a result to explore the difference.
Explore the real example$ invar verify
Behavior matches.
All configured examples match the accepted baseline.
ACCEPTED STDOUT
alice bob carol
CURRENT STDOUT
alice bob carol
A passing result covers your configured examples, not every possible behavior. Invar complements your tests.
No account. No hosted service. Just reviewed commands, accepted observations, and an explicit point of comparison.
Start with a local configuration. Review the commands before running them.
$ invar initRecord exit code, stdout, and stderr. The capture is a candidate, not approval.
$ invar captureInspect the candidate. Accept its exact hash when you approve the behavior.
$ invar lock --candidate <hash>Change the code. Compare the next run with your accepted examples.
$ invar verifyGive a changing codebase a stable reference. Keep the observations in your repository and the review in your hands.
Compare exit code, stdout, and stderr byte for byte. No normalization. No semantic guesswork.
Run the CLI locally. Keep configuration and accepted observations under ordinary source review.
Capturing never accepts changes. Verification never rewrites your baseline. You choose what becomes the reference.
Configured commands are not sandboxed. Hashes pin a candidate; they don’t authenticate its reviewer.
Read the security modelInstall Invar. Capture the behavior worth keeping.
Read the documentationcurl -fsSL https://github.com/zhugez/invar/raw/main/install.sh | shNo sudo or Rust toolchain required. Review the installer first.
Using macOS or another architecture? Build from source