Skip to main content
Compare your current API schema against the last saved snapshot. Reports added, removed, modified, and breaking changes. Use --fail-on-breaking to gate CI pipelines.

Usage

dino diff --tenant <id> [flags]

Flags

FlagTypeDefaultDescription
--tenantstringRequired. Tenant ID (or set in .dino.yml)
--envstringTenant defaultTarget environment
--format"markdown" | "json""markdown"Output format
--quietbooleanfalseSuppress stdout output
--snapshot-dirstring.dino/snapshotsDirectory for reading and writing snapshots
--fail-on-breakingbooleanfalseExit with code 1 if breaking changes are detected

How It Works

  1. Discover — Introspects the live API schema
  2. Build snapshot — Creates a snapshot of the current schema
  3. Load previous — Reads the most recent snapshot from disk
  4. Diff — Compares previous vs. current and categorizes changes
  5. Save — Writes the current snapshot as the new baseline
On the first run (no previous snapshot exists), the current schema is saved as the baseline. No diff is produced.
First snapshot saved.

Examples

Check for schema changes

dino diff --tenant acme --env staging
# Schema Diff — acme / staging

## Summary
  Added: 3 | Removed: 1 | Modified: 2 | Breaking: 1

## Breaking Changes
  - Removed field `User.legacyId`

## Added
  - Field `User.avatarUrl`
  - Field `User.preferences`
  - Query `searchUsers`

## Modified
  - Field `User.email` — type changed (String → String!)

CI gate for breaking changes

dino diff --tenant acme --env production --fail-on-breaking
Returns exit code 1 if any breaking changes are detected. Use this in CI to block deployments that introduce breaking API changes.
- name: Schema compatibility check
  run: dino diff --tenant acme --env production --fail-on-breaking

JSON output for tooling

dino diff --tenant acme --format json > diff.json
Commit your .dino/snapshots directory to version control so that dino diff always has a baseline to compare against, even in fresh CI environments.

Exit Codes

CodeMeaning
0No breaking changes (or --fail-on-breaking not set)
1Breaking changes detected with --fail-on-breaking, or command error