Initialize the workspace
Creates a local .contractsanbox/ folder and auto-detects any spec files in the current directory.
$ csb init ✓ initialized .contractsanbox/ ✓ detected spec: openapi.ymlContractSanbox scores every change to your OpenAPI spec, mocks any version in one command, and blocks regressions in CI. Versioned contracts, compatibility scoring, verified mocks, and ephemeral sandboxes.
Register every change to your OpenAPI spec with immutable hashes and semver labels. Nothing gets lost, nothing gets overwritten.
Every diff produces a backward and forward score from 0 to 100. Know exactly how dangerous a change is before you ship it.
Record live traffic against a contract and get a fidelity score that shows exactly where your implementation diverges from the spec.
No dashboards required. The CLI is the interface. Everything works offline against a local SQLite store.
Creates a local .contractsanbox/ folder and auto-detects any spec files in the current directory.
$ csb init ✓ initialized .contractsanbox/ ✓ detected spec: openapi.ymlAssigns a contract name and a semver. Hashes the spec so future uploads can never silently overwrite history.
$ csb push openapi.yml --version 1.2.0 ✓ registered users-api@1.2.0 sha256:3a7c...f8b1Shows every breaking, warning and info change between any two versions in a structured tree.
$ csb diff 1.1.0 1.2.0 ✗ breaking required field removed User.email ! warning response type narrowed GET /users/{id} · info new optional field added User.nicknamePrints backward and forward compatibility scores. Green is safe, yellow needs review, red is breaking.
$ csb score backward 42 / 100 (breaking) forward 98 / 100 (safe)Starts a spec-backed mock server for any version in one command. No stubs, no hand-written fixtures.
$ csb mock [email protected] --port 9100 ✓ mock server ready http://localhost:9100No SaaS lock-in. Single binary. One config file. Plug it into CI in five minutes.
Every spec is hashed and versioned. GraphQL and Protobuf adapters are on the roadmap.
Changes are classified as breaking, warning, or info — not a flat line-by-line output.
Two independent scores so you know who gets hurt: old clients, new clients, or both.
Mock any contract version on any port. Faker-backed responses. No stubs to maintain.
Record live traffic and see exactly where production diverges from the declared contract.
Block merges below a minimum score, reject breaking changes, require manual approval. Enforced in CI.
Isolated, branch-scoped environments for integration tests. Self-destruct after a configurable TTL.
No daemon, no sidecar, no Docker required. SQLite under the hood. Start in half a second.
Edit a YAML file. Hit the REST API with curl. Call the CLI from any CI runner. No proprietary protocols, no magic.
# Block merges unless scores clear these thresholds policy: min_backward_score: 90 min_forward_score: 80 allow_breaking: false require_approval_below: 95 gates: - name: ci-merge enforce: on_push actions: - score - drift_check notify: slack_webhook_env: "SLACK_WEBHOOK_URL" on_violation: true
# Upload a spec curl -X POST http://localhost:9090/api/v1/contracts \ -H "Content-Type: application/json" \ -d '{"name":"users-api","spec":"..."}' # Score a diff between two versions curl http://localhost:9090/api/v1/score \ ?from=1.1.0&to=1.2.0 # Create an ephemeral sandbox curl -X POST http://localhost:9090/api/v1/sandboxes \ -d '{"branch":"feat-x","ttl":"2h"}'
Every breaking change without warning becomes a pager at 2am. ContractSanbox turns that into a red CI check.
Versioning, deprecation, and forward compatibility become provable instead of guessed at.
Detect when a regenerated SDK will break consumers before the PR hits main.
ContractSanbox is in active development. We are onboarding teams in waves. Leave your email and we will reach out when we are ready for you.