@apidiffguard/cli
v0.3.2
Published
CLI for APIDiffGuard — diff API JSON responses and fail CI on breaking changes.
Maintainers
Readme
@apidiffguard/cli
Command-line JSON / API response diff for CI and local checks. Uses the same engine as APIDiffGuard Cloud (@apidiffguard/diff).
Install
npm install -g @apidiffguard/cli
npx @apidiffguard/cli --helpUsage
# Compare two files
apidiff check --baseline baseline.json --current live.json --fail-on breaking
# Compare a baseline file to a live URL
apidiff check --baseline baseline.json --url https://httpbin.org/json --fail-on warning
# Machine-readable output
apidiff check --baseline a.json --current b.json --jsonExit codes
| Code | Meaning |
| --- | --- |
| 0 | No changes at or above --fail-on |
| 1 | Failing severity found |
| 2 | Usage / runtime error |
--fail-on accepts breaking (default), warning, or info.
