Skip to main content

graphify-diff (gdiff)

graphify-diff symbol graph patcher

Incremental graph updates from git diffs — patch a Graphify knowledge graph without re-extracting the entire codebase.

The Problem

You run graphify extract to build a dependency/relationship graph of your codebase. Then you make changes and have to re-run the full extraction. For large codebases with docs and images, this means LLM API calls and minutes of waiting — even for a one-line change.

The Solution

graphify-diff reads a git diff, identifies which symbols (functions, classes, imports) were added, removed, or modified, and patches the existing graph.json in-place. No LLM calls. No tree-sitter re-parsing. Seconds instead of minutes.

How It Differs from graphify update

Graphify already has graphify update, which re-extracts only changed files. But it still:

  • Re-parses every changed file with tree-sitter
  • Re-runs the full graph merge pipeline
  • Re-clusters all communities

graphify-diff skips all of that. It works at the symbol level, not the file level. If you change one function in a 500-line file, only that function's node and edges are touched.


Quick start

pip install graphify-diff

Then run from inside a repo with no arguments — baseline is auto-detected from the last graph build:

gdiff patch        # apply the diff to graph.json
gdiff analyze      # read-only preview of what would change
gdiff impact       # trace transitive effects on the graph

Override the baseline with --since:

gdiff patch --since HEAD~1
gdiff patch . --since main     # run from outside the repo

Subcommands

Command What it does
gdiff patch Apply a git diff to graph.json — cascades through dependent nodes (default depth: 3)
gdiff analyze Read-only parse of what would change — no graph required
gdiff impact Trace transitive effects on the existing graph — does not modify it

Patch flags

Flag Description
--since / -s <ref> Git ref to diff against (auto-detected if omitted)
--staged Diff staged changes instead of unstaged
--dry-run / -n Show what would change without writing
--cascade-depth / -d <n> How far to cascade dependency changes (default: 3)
--graph / -g <path> Path to graph.json (default: graphify-out/graph.json)
--output / -o <path> Output path (default: overwrite input)
--json Emit machine-readable JSON output

Analyze & impact flags

Flag Description
--since / -s <ref> Git ref to diff against
--staged Diff staged changes
--depth / -d <n> Cascade depth for impact analysis
--graph / -g <path> Path to graph.json

Project links

Source github.com/toshon-jennings/graphify-diff
PyPI pypi.org/project/graphify-diff
Issues GitHub Issues
Changelog GitHub Releases

License

MIT © 2026 Toshon Jennings

Metadata

Release files for graphify-diff 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graphify-diff 0.2.1
File Size Uploaded
graphify_diff-0.2.1.tar.gz 641.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for graphify-diff 0.2.1
File Interpreter ABI Platform
graphify_diff-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 663.0 kB

Release files / graphify_diff-0.2.1.tar.gz

Download URL graphify_diff-0.2.1.tar.gz
Size 641.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f61e3254ea0054177debabbb80aef61b9e76b1981f12c7813f92a0a08e3fc69e
BLAKE2b-256 checksum
How to use checksums
5c32e7432a0b537f3f40f53d92a0ac499f8494ed99e7b140b6cca9241b6ff47d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release files / graphify_diff-0.2.1-py3-none-any.whl

Download URL graphify_diff-0.2.1-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a22d5f6197bed40d3b5f8eade2ddcd90d1f5dd11f3efeb8dd00bc7255d53a6ff
BLAKE2b-256 checksum
How to use checksums
e06152de31e324f4fa1a7c9aa0481db5ca7134ab0654b32ffab9398fdf8ac97c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page