Skip to main content

BreakScope

See what your API changes will break — before they reach production.

API contract changes are easy to detect. Knowing what they break isn't. BreakScope diffs your OpenAPI specs and traces each breaking change to the exact file:line in your Python and TypeScript code that's likely affected.

pip install breakscope
breakscope analyze openapi-old.yaml openapi-new.yaml path/to/repo
API IMPACT ANALYSIS
────────────────────────────────────────────────

BREAKING CHANGES: 4

1. User.name  (response.property.removed)
   A response property was removed. In GET /users, POST /users, GET /users/{userId}.

   Likely affected code:

   🔴 backend/services/user_report.py:12
      return resp.json()["name"]
                         ^^^^^^

   🔴 frontend/src/components/UserProfile.tsx:18
      <h1>{user.name}</h1>
                ^^^^

2. DELETE /users/{id}
   DELETE /users/{id} was removed  (endpoint.removed)

   Likely affected code:

   🔴 frontend/src/api/users.ts:22
      await axios.delete(API_URL + "/users/" + id);
...
────────────────────────────────────────────────
Files affected: 3
Locations affected: 4
Risk: HIGH

Try it on the demo:

breakscope analyze examples/demo/api/openapi-v1.yaml examples/demo/api/openapi-v2.yaml examples/demo

How it works

  1. Diff the two specs into direction-aware changes, each with the exact field path (User.name).
  2. Find call sites of every operation with tree-sitter: fetch, axios, Angular HttpClient, requests, httpx, aiohttp and custom clients.
  3. Trace the response through await, .data, .json(), .then(), destructuring, .map()/for loops, RxJS pipe(map()) and React useState, and one hop across a function return.
  4. Report each read of a changed field with a confidence level:
Confidence Meaning
🔴 high Data flow traced from a matching API call to this line
🟡 medium Traced through a function return, or the URL match was fuzzy
⚪ low Name match only (user.name where the schema is User); hidden unless --min-confidence low

Static analysis can't be perfect, so BreakScope tells you how sure it is instead of pretending. Accuracy on the test corpus is tracked in CI: see docs/accuracy.md.

Commands

Command What it does
breakscope analyze OLD NEW [REPO] Changes → affected file:line. Exit 1 if anything at --fail-on risk (default high).
breakscope diff OLD NEW Contract changes only. Exit 1 on breaking changes.
breakscope usages SPEC [REPO] Where your code calls each operation.

All commands take --format json and --output FILE. analyze and usages take --base-url /api/v1 (a path prefix your code adds) and --exclude GLOB.

No account, no API key, no hosted service. Everything runs locally.

Status: v0.4: impact analysis. Supports OpenAPI 3.0/3.1, Python, TypeScript and JavaScript. See the roadmap.

License

MIT

Metadata

Release files for breakscope 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for breakscope 0.4.0
File Size Uploaded Provenance Actions
breakscope-0.4.0.tar.gz 67.0 kB With provenance Details for breakscope-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for breakscope 0.4.0
File Interpreter ABI Platform Actions
breakscope-0.4.0-py3-none-any.whl Python 3 none any Details for breakscope-0.4.0-py3-none-any.whl

Total release size: 117.0 kB

Release files / breakscope-0.4.0.tar.gz

Download URL breakscope-0.4.0.tar.gz
Size 67.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6af647580826414dc5ba5de9eb9254953d520eca550810e86435804effe3ad6e
BLAKE2b-256 checksum
How to use checksums
62ed68a5ee73164fffa9e72d5ff6f16079d9dbb87e0fe52e3dc8696fc7feb60c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / breakscope-0.4.0-py3-none-any.whl

Download URL breakscope-0.4.0-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e93feebe9cec35f6943d207ce0ecbe419396b8188bcd89c64981c9880360ef16
BLAKE2b-256 checksum
How to use checksums
42a9778d5972c9d330d96486a8299c6f9f33d413a830eab82ad879c974e2e779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Security for breakscope 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for breakscope-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page