# trailofbits/graphtage

A semantic diff utility and library for tree-like files such as JSON, JSON5, XML, HTML, YAML, and CSV.

Repository: https://github.com/trailofbits/graphtage
Canonical: https://ross.abutalabs.com/products/graphtage
Language: Python
License: LGPL-3.0
License Family: copyleft
Topics: diff, library, python, graph-algorithms, hacktoberfest, hacktoberfest2021, command-line-tool, utility
Last push: 2026-08-04T18:42:40+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 8, longevity 100
- inputs: {"age_days": 2325, "days_push": 29, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2478, forks 56 (observed 2026-08-28T04:06:55.151750+00:00)

## What it is
Graphtage is a command-line utility and Python library for semantically diffing and merging tree-structured files like JSON, YAML, XML, HTML, TOML, and CSV. It works on a file-format-agnostic intermediate representation, allowing cross-format diffs and customizable output formatting.

## Use cases
- diff two  files semantically
- compare a  file against a yaml file
- show structured edits between xml documents
- merge changes between tree-like config files
- print a concise digest of edits between structured files
- reformat a diff output in a different file format

## When to choose
- you need semantic diffs of structured data rather than line-based text diffs
- you want to compare files in different formats like JSON vs YAML
- you need a programmable diff library for tree structures in Python

## When to avoid
- you only need plain line-by-line text diffing of source code
- you need to diff very large files where the tree-edit-distance computation is too slow
- you need binary or non-tree file format comparison

## Facets
- artifact type: cli-tool
- maturity: stable
- function: cli, parser, serialization, developer-tools
- domain: developer-tools, files, apis
- platform: python, cli, cross-platform
- tags: semantic-diff, yaml, xml, tree-diff, file-comparison, command-line

## Member repositories
- trailofbits/graphtage (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.151750+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:28:18.596049+00:00, confidence not recorded.
  - readme: https://github.com/trailofbits/graphtage (fetched 2026-08-28T04:06:55.151750+00:00, sha a761989e8d27)
  - registry_pypi: https://pypi.org/pypi/graphtage/json (fetched 2026-08-29T10:10:29.060260+00:00, sha 027bf56c1f28)
- Data as of 2026-08-30T08:39:29.467469+00:00.
