# graphify

> Turn a folder of code, docs, PDFs and images into a queryable knowledge graph

- Category: Retrieval & Knowledge (RAG) / RAG Frameworks & Platforms
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/Graphify-Labs/graphify
- Website: https://www.graphify.com
- Canonical page: https://ai-tldr.dev/tools/graphify/
- Updated: 2026-04-03

## In short

graphify builds a knowledge graph out of whatever you point it at — source code, Markdown notes, PDFs, screenshots and diagrams — and then lets you and your coding agent query that graph instead of re-reading the raw files. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

graphify builds a knowledge graph out of whatever you point it at — source code, Markdown notes, PDFs, screenshots and diagrams — and then lets you and your coding agent query that graph instead of re-reading the raw files. It runs locally: code is parsed deterministically with tree-sitter into an AST plus a call-graph pass, while docs, papers and images are turned into concepts and relationships by an LLM. There is no vector store and no Neo4j server required; the stack is NetworkX, Leiden community detection via graspologic, tree-sitter and vis.js.

A run writes a `graphify-out/` directory containing an interactive `graph.html` you can click through, an Obsidian-compatible vault, a persistent `graph.json` you can query weeks later, a `GRAPH_REPORT.md` that surfaces 'god nodes' (the highest-degree concepts everything routes through) and surprising cross-document connections, and a SHA256 cache so re-runs only reprocess changed files. Every edge is labelled `EXTRACTED`, `INFERRED` or `AMBIGUOUS`, so it stays clear which relationships were read out of the source and which were guessed.

It is designed to be driven by an agent. It installs as a `/graphify` skill for Claude Code and can also expose the graph over MCP with `--mcp`, so an agent can ask for a path between two symbols or an explanation of one. A `--wiki` mode emits Wikipedia-style Markdown articles with an `index.md` entry point, which lets any agent navigate the knowledge base by reading files. A `--watch` mode and a post-commit git hook keep the graph in sync as code changes.

## What it does

- Deterministic AST extraction with tree-sitter for Python, TypeScript, JavaScript, Go, Rust, Java, C/C++, Ruby, C#, Kotlin, Scala and PHP, plus a call-graph pass
- Multimodal ingestion — Markdown and text, PDFs with citation mining, and images (screenshots, diagrams, whiteboard photos) via model vision
- Runs fully locally on NetworkX + Leiden communities; no vector store and no Neo4j server needed
- Every edge tagged EXTRACTED, INFERRED or AMBIGUOUS so you can tell findings from guesses
- Outputs an interactive graph.html, an Obsidian vault, a persistent graph.json, and a GRAPH_REPORT.md of god nodes and surprising connections
- Agent-facing surfaces: a /graphify skill, an MCP stdio server (--mcp), and a crawlable Markdown wiki (--wiki)
- Incremental by design — SHA256 cache, --update for changed files, --watch for live sync, and a post-commit git hook
- Exports to SVG, GraphML (Gephi, yEd) and Neo4j cypher

## Getting started

graphify installs as a Python package that registers a Claude Code skill. It requires Claude Code and Python 3.10 or newer.

1. Install

   Install from PyPI and register the skill. The PyPI package is named graphifyy while the graphify name is being reclaimed; the CLI and skill command are still graphify. On macOS with an externally-managed Python, or on Windows if the command is not found, use pipx instead.

```bash
pip install graphifyy && graphify install
```

2. Build a graph

   Open Claude Code in any directory and run the skill against a folder. It writes everything to graphify-out/.

```text
/graphify .
/graphify ./raw --mode deep      # more aggressive INFERRED edge extraction
/graphify ./raw --update         # re-extract only changed files
```

3. Query the graph

   Ask questions of the graph, trace a path between two symbols, or explain a single node.

```text
/graphify query "what connects attention to the optimizer?"
/graphify path "DigestAuth" "Response"
/graphify explain "SwinTransformer"
```

4. Keep it in sync and expose it

   Watch a folder for changes, install a post-commit hook, or serve the graph to an agent over MCP.

```text
/graphify ./raw --watch
graphify hook install
/graphify ./raw --mcp
```

## When to use it

- Reach for it when an agent needs the shape of a large codebase and reading the raw files would burn the context window
- Reach for it to connect scattered research material — papers, notes, screenshots — into one navigable graph
- Reach for it when you want graph-based retrieval with auditable edges rather than opaque vector similarity
- Reach for it to keep a live map of a repository while several agents write code in parallel

## Version history

- 2026-04-03: Covered by AI/TLDR: turns a folder of code, docs, papers, images and video into a queryable knowledge graph using tree-sitter ASTs and Leiden clustering, queried by an agent instead of reading raw files.
