apidrift
v0.1.0
Published
Detect API breaking changes before they break your code
Maintainers
Readme
APIDrift CLI
Detect API breaking changes before they break your code.
Quick Start
npx apidrift check https://petstore3.swagger.io/api/v3/openapi.jsonInstall
npm install -g apidriftCommands
apidrift check <url>
Fetch an API schema and compare against the previous snapshot.
- Saves snapshots locally in
.apidrift/ - Shows colored diff of changes
- Detects breaking changes automatically
apidrift check https://api.example.com/openapi.jsonapidrift diff <url1> <url2>
Compare two API schemas side by side.
apidrift diff https://api.example.com/v1/openapi.json https://api.example.com/v2/openapi.jsonExit Codes
| Code | Meaning | |------|---------| | 0 | No changes detected | | 1 | Non-breaking changes detected | | 2 | Breaking changes detected |
CI/CD Integration
# GitHub Actions example
- name: Check API for breaking changes
run: npx apidrift check https://api.example.com/openapi.jsonExit code 2 means breaking changes were detected — fail the build accordingly.
Supported Formats
- OpenAPI / Swagger (JSON)
- GraphQL Introspection
Zero Dependencies
APIDrift CLI uses only Node.js built-in modules. Requires Node.js 18+.
Cloud Dashboard
For team features, alerts, and auto-patch PRs: https://api-drift-beige.vercel.app
License
MIT
