owlcompare

Diff OWL/RDF ontologies,
find what really changed

owlcompare goes beyond triple-level diff — it surfaces renames, restriction changes, and severity-classified breaking changes, in a report built for humans reviewing a pull request, not for compilers.

pip install owlcompare

See it in action

One command turns two ontology files into a self-contained, interactive report you can open offline, attach to an email, or commit to a PR.

owlcompare HTML report rendering a Vehicle-domain diff: five Layer 1 changes spanning a class addition (additive), an object property removal (breaking), a restriction relaxation (non-breaking), a French label refinement (info), and an ontology metadata bump (info).
The interactive HTML report: severity-striped cards, grouped by Renames → Breaking → Other.
The same diff rendered as a Markdown PR comment, posted automatically by the owlcompare GitHub Action and updated in place on subsequent commits.
The same diff as a PR comment — posted and updated in place by the GitHub Action.

Five output formats: terminal, beautiful HTML, PR-comment-ready Markdown, plus JSON and JUnit XML for automation.   Open a live HTML report →  ·  a rename example →

What makes it different

Existing tools list every added and removed axiom. owlcompare tells you what those axioms mean.

Beyond triple-level diff

A four-layer model — syntactic, structural, inferential, impact — collapses hundreds of axiom edits into the handful of semantic events that actually matter. A class move stops being 200 changes and becomes one.

Smart rename detection

An entity that was renamed shows up as one rename — not an add plus a remove — across three confidence tiers (label, structural fingerprint, user-asserted). When it isn't sure, it shows confidence, not certainty.

CI-ready

A three-line GitHub Action diffs your ontology on every pull request, posts the report as a comment, uploads HTML + JUnit artifacts, and fails the build on breaking changes. Exit codes and JUnit XML are first-class.

Install in 30 seconds

Pure Python, no JVM. Pick your tool.

# Install the CLI from PyPI
pip install owlcompare

# …or as an isolated tool
pipx install owlcompare
# Your first diff — text report to the terminal
owlcompare diff old.ttl new.ttl

# …or a self-contained HTML report you can share
owlcompare diff old.ttl new.ttl --format html --out report.html

From noise to signal

A real edit to a small example ontology, two versions apart.

$ owlcompare diff sample_v1.ttl sample_v2.ttl

9 triples added, 10 triples removed (1 breaking)

Layer 1 — Structural (5 changes)
  [additive]     Class added: ex:ElectricVehicle
  [breaking]     Object property removed: ex:assembledAt
  [non_breaking] Restriction changed on ex:Car:
                 ex:hasWheel max 4 → max 6
  [info]         Label changed on ex:Vehicle (fr)
  [info]         Ontology metadata: versionInfo 1.0.0 → 2.0.0
195

19 raw triple changes become 5 meaningful events — and exactly one is flagged breaking, so your CI knows when to stop the merge.

See the full interactive report →