ApiDiff.Cli
0.2.0
dotnet tool install --global ApiDiff.Cli --version 0.2.0
dotnet new tool-manifest
dotnet tool install --local ApiDiff.Cli --version 0.2.0
#tool dotnet:?package=ApiDiff.Cli&version=0.2.0
nuke :add-package ApiDiff.Cli --version 0.2.0
ApiDiff
<div align="center"> <img src="assets/apidiff-logo.png" alt="ApiDiff Logo" width="300" /> </div> Stop breaking your downstream clients.
ApiDiff is a lightning-fast CLI tool that compares two OpenAPI/Swagger specifications and immediately highlights the breaking changes. Perfect for local development or integrating into your CI pipeline to catch API contract violations before they reach production.
Features
- Deterministic detection of breaking changes
- Outputs specific endpoints and reasons for the failure
- Lightweight and fast
Example Output
> apidiff compare --old old.json --new new.json
BREAKING: DELETE /users/{id} removed
BREAKING: required field 'email' added to request body for POST /users (application/json)
Catch Breaking Changes in CI
Use --fail-on-breaking to block pull requests that introduce breaking API changes.
apidiff compare --old prev.json --new curr.json --fail-on-breaking
GitHub Actions Example:
- name: Run ApiDiff explicitly
run: |
apidiff compare --old prev.json --new curr.json --fail-on-breaking
Exit Codes
0: No breaking changes detected (or--fail-on-breakingnot specified)2: Breaking changes detected (with--fail-on-breaking)64: Invalid arguments or file processing error
Installation (Global Tool)
dotnet tool install --global apidiff
Local Development Usage
If you haven't installed it globally, you can run it directly from source:
dotnet run --project src/ApiDiff.Cli/ApiDiff.Cli.csproj compare --old prev.json --new curr.json
Supported Specs
- Supports OpenAPI 3.x (JSON)
🔥 Upgrade to ApiDiff Pro! Get URL/directory scanning, Markdown/HTML reports, CI failure mode, and AI-powered Pull Request summaries. 👉 Buy ApiDiff Pro here
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0 | 82 | 2/24/2026 |
Initial public release of ApiDiff CLI featuring 5 core rules and RSA licensing.