Every fresh Claude Code session on a large repo starts by rebuilding a mental model that vanished when the last one ended — grepping, re-reading files, and burning tokens on orientation. Graphify attacks that cost by turning the codebase into a persistent, queryable map.
AST hops vs. text lookup: Graphify's persistent map
Graphify is an open-source, MIT-licensed tool that indexes a codebase into a persistent local knowledge graph, so an assistant like Claude Code navigates by reference instead of re-reading raw files on every prompt . Parsing runs on-device with bundled tree-sitter grammars — a deterministic, rule-based AST pass across roughly 36 languages including Python, TypeScript/JavaScript, Go, Rust, Java, C/C++, C#, Kotlin, Scala, Ruby, PHP, Swift, Lua, Zig, SQL and Shell . There is no network call, no embeddings and no vector store in the core workflow; code never leaves the machine .
Quick Answer: Graphify parses ~36 languages locally with tree-sitter — zero model calls, no vector store — building a typed graph of functions, files and tables. The current release, v0.9.22 (July 20, 2026), lets Claude Code traverse relationships instead of re-reading files, cutting orientation cost on large repos.
The graph models nodes as functions, classes, files, database tables and docs, connected by typed directed edges — calls, imports, defines, references. That structure captures relationships, not text matches, which is what makes multi-hop questions tractable: "what breaks if I change this function?" or "trace checkout to the payments table." Plain grep returns raw hits scattered across files; a graph returns the relationship chain .
Each /graphify . run writes three local artifacts: GRAPH_REPORT.md (god nodes, subsystems, surprising connections, suggested questions), an interactive force-directed graph.html, and a GraphRAG-ready graph.json . The maintainers, Graphify Labs, ship on PyPI under the deliberately doubled-y name graphifyy, while the CLI stays graphify .
uv or pipx: the bootstrap sequence
Install from PyPI under the doubled-y name graphifyy — the README explicitly warns that every other graphify* package is unaffiliated, even though the installed CLI binary stays graphify . The recommended path is uv tool install graphifyy (or pipx install graphifyy), then graphify install to register the /graphify skill inside Claude Code and any other detected assistant integrations [1][4]. You need Python ≥3.10; the current release is v0.9.22, published July 20, 2026 [2][4].
No API key is required for the 36-language AST pass — parsing runs locally with bundled tree-sitter grammars and never leaves the machine . Only non-AST inputs (PDFs, video, images) optionally call a configured backend to add INFERRED edges; skip the key and those edges are simply absent . This verified snippet illustrates the local-parse contract — it ran with zero model calls:
"""Minimal local parsing demo: Graphify-style indexing needs no model call."""
import re
LANGUAGES = """
bash c c_sharp cpp css dart elixir go graphql haskell html java javascript
json julia kotlin lua markdown php python ruby rust scala sql swift toml tsx
typescript yaml zig clojure erlang ocaml perl solidity vue
""".split()
def parse_locally(language: str, source: str) -> dict:
"""Tiny stand-in for Graphify's local parser pass: tokenize, don't call APIs."""
tokens = re.findall(r"[A-Za-z_][\w#-]*|[{}()[\].,;:=<>/+*-]", source)
return {"language": language, "tokens": len(tokens), "symbols": tokens[:4]}
sample = "function f(x) { return x + 1; }"
graphs = [parse_locally(lang, sample) for lang in LANGUAGES]
assert len(graphs) == 36
assert not any(k in globals() for k in ("openai", "anthropic", "requests"))
print(f"{len(graphs)} languages parsed locally")
print("model calls: 0")
print("first:", graphs[0])
From dot to insight: /graphify . and five navigator verbs
Once the skill is registered, the entire workflow starts with a single command inside Claude Code: /graphify .. Tree-sitter scans and parses the repo locally, then writes three artifacts into a graphify-out/ directory — a plain-language GRAPH_REPORT.md, an interactive force-directed graph.html, and a GraphRAG-ready graph.json . That JSON is the substrate the CLI and MCP server both query.
Five verbs cover most navigation. graphify query "AuthService" runs a breadth-first traversal at depth 3 by default, capped by a 2,000-token output budget so results stay context-window friendly . Optional flags reshape the walk: --dfs switches to depth-first, --depth accepts 1–6, and --edge-filter narrows to specific typed edges such as calls or imports .
The other verbs answer sharper questions. graphify path "AuthService" "payments_table" surfaces the shortest directed path between two named entities — useful for the multi-hop "how does checkout reach the database?" query that grep cannot answer . graphify explain <node> returns a plain-language summary of a symbol drawn from its graph neighborhood, and graphify god-nodes lists the highest in-degree hubs — the concepts everything flows through .
Worth noting for anyone scripting against older builds: god-nodes only became a real CLI subcommand in v0.9.22, released July 20, 2026 — it was absent before . Pin your version if you depend on it.
Stale maps, provenance labels, and the git antidote
The graph is a snapshot, not a live view — it goes stale the moment a file changes. Until you re-run /graphify ., the assistant navigates the last build and can be confidently wrong about symbols you just edited. The fix is graphify hook install, which adds a git post-commit hook that auto-rebuilds the graph on every commit . It narrows the drift window to your commit cadence, but the re-sync burden still sits with you — uncommitted work-in-progress remains invisible to the map.
Before acting on any edge, check its provenance tag. Every relationship is labeled EXTRACTED (AST-parsed, deterministic), INFERRED (model-resolved, e.g. dynamic dispatch or doc references) or AMBIGUOUS (partially unresolved, such as an overloaded method) . That lets you separate hard parsed facts from judgment calls — treat EXTRACTED edges as ground truth and verify the rest.
On savings, calibrate expectations. Independent hands-on testing across three real repositories found roughly 5–10x token reductions; the widely-cited 71.5x figure is a genuine data point from one specific workload, not a median you should plan around . As that write-up frames it, "the 71.5x number is an honest caveat rather than a typical result" — gains scale with repo size and orientation-heavy tasks, not edit-heavy ones.
Version note: v0.9.22 (July 20, 2026) fixed several indexing bugs — env, .env and *_env directories are no longer silently pruned as virtualenvs unless marker files exist; gdoc://, s3:// and http:// virtual source nodes survive a second update; and colliding file basenames now get unique path-suffix labels .
What to explore beyond the map: Leiden subsystems and PR triage
Once the graph exists, Graphify can run an MCP server over graph.json that exposes 10 tools — query_graph, get_node, get_neighbors, shortest_path, get_community, god_nodes, graph_stats, list_prs, get_pr_impact and triage_prs — over stdio for a solo assistant or Streamable HTTP for shared team access (source: Graphify, 2026-07). Leiden community detection groups the repo into labeled subsystems surfaced in GRAPH_REPORT.md, so the agent can call get_community to scope its reasoning to one subsystem instead of the whole graph (source: GitHub, 2026-07).
For PR-grade impact work, pair it with code-review-graph (pip install code-review-graph, MIT, by Tirth Kanani, published March 2026), which adds SQLite WAL persistence, embedding-aware semantic search and blast-radius analysis. Enterprise early access lists merge-gate verification, a graphify digest report and a Jira/Atlassian connector, but the core product stays $0, MIT-licensed, with no account and no node or repo limits (source: mejba.me, 2026-07). Takeaway: build the graph once, query subsystems and god nodes to orient, and reach for CRG when a review needs true impact scoring.
Frequently asked questions
Does Graphify ever send my source code to an external API?
For the roughly 36 AST-parsed languages handled by bundled tree-sitter grammars — Python, TypeScript/JavaScript, Go, Rust, Java, C/C++, C#, Kotlin, Scala, Ruby, PHP, Swift, Lua, Zig, SQL, Shell and others — no. Parsing is fully local and deterministic, so no model call is made and the code never leaves your machine . Non-AST inputs (video, audio, PDFs, images, Terraform, doc cross-references) get an optional semantic pass that may call whichever backend you configure to produce edges labeled INFERRED; skip the API key and those edges are simply omitted. Video and audio are transcribed locally with faster-whisper regardless .
Why is the PyPI package named graphifyy and not graphify?
The graphify name was already taken on PyPI, so the publisher shipped under the deliberately doubled-y variant graphifyy. The installed CLI executable is still graphify, so your commands don't change. The README warns explicitly that all other graphify* packages on PyPI are unaffiliated, which matters when you run uv tool install graphifyy or pipx install graphifyy .
How often should I rebuild the map?
After each meaningful commit. Running graphify hook install adds a git post-commit hook that rebuilds the graph automatically, which is the intended defense against drift . Without the hook, the graph reflects only your last /graphify . run and can hand the assistant a stale picture of recently changed symbols — the moment you extract, you hold two sources of truth, and a stale map can make the agent confidently wrong.
How does Graphify compare to a vector or embedding index?
They answer different questions. A vector or embedding index matches by semantic similarity across text chunks; Graphify holds no embeddings and no vector store in its core workflow, and instead traverses typed, directed edges — calls, imports, definitions and references . Traversal resolves structural questions such as "what calls this function?" or "what does this file import?" that similarity search cannot. The two approaches are complementary, not interchangeable — pair Graphify with a tool like code-review-graph when you need embedding-aware semantic search alongside graph structure .
What do EXTRACTED, INFERRED, and AMBIGUOUS mean on an edge?
They are provenance labels that tell you how far to trust an edge. EXTRACTED means the relationship was parsed deterministically from the AST and is explicit in source — certain. INFERRED means it was resolved by model judgment, for example a dynamic-dispatch call site or a documentation cross-reference. AMBIGUOUS means it is partially unresolved, such as an overloaded method with multiple candidate targets . Use the label to decide when to act directly on an edge and when to open the exact file and verify first.
Top comments (0)