Installation
Install the CLI globally or as a dev dependency.
Contractual is a CLI and GitHub Action that orchestrates the schema contract lifecycle: linting, breaking change detection, versioning, and changelog generation for OpenAPI and JSON Schema. Point it at spec files and it detects changes, classifies impact, generates a changeset, bumps versions, and writes changelogs. In CI, it posts a structured diff table on pull requests and opens a “Version Contracts” PR when release is ready.
Contractual is for teams that:
No specific language, framework, or gateway is required. Contractual works with whatever generates or validates schemas.
Before Contractual, a typical workflow looks like this:
Contractual replaces those manual steps with a single CI command and a config file that captures governance rules once.
ANTHROPIC_API_KEY and Contractual enriches PR comments and changelog entries with plain-language explanations of what changed and what consumers need to doContractual uses a two-PR pattern for releasing contract changes:
contractual changeset to describe the changeThe CLI is git-agnostic by design. It never commits, tags, or pushes. You control your git history. The GitHub Action handles release automation.
Here’s what running contractual breaking looks like on a project with two contracts:
$ contractual breaking
✗ orders-api: 2 breaking changes BREAKING Removed endpoint GET /orders/{id}/details BREAKING Changed type of field 'amount': string → number
✓ order-schema: 1 non-breaking change MINOR Added optional field 'shipping_address'
2 breaking changes detected. Exit code 1.That output drives the PR comment, the changeset classification, and the version bump on merge.
Choose a path based on role.
Set up Contractual in the repository, configure governance, and manage releases.
Installation
Install the CLI globally or as a dev dependency.
Quickstart
Zero to first working contractual breaking in 5 minutes.
GitHub Action
First PR check running in 5 minutes.
Configuration
Set up contractual.yaml for the project.
You opened a PR and Contractual left a comment. You want to understand the comment or edit the auto-generated changeset.
Breaking Change Detection
How Contractual detects and classifies changes.
Versioning
What a changeset file is and why it exists.
Changeset Format
How to read and edit the auto-generated .md file.