# graphify

> Maps a codebase and its docs into a knowledge graph your AI assistant can query

- Repository: https://github.com/Graphify-Labs/graphify
- Category: Memory, RAG & data
- Stars: 133,096 · Forks: 12,730 · Language: Python · License: Apache-2.0
- Experience: Some experience
- Page: https://ir.adyog.com/repos/graphify-labs/graphify/

When you ask an AI assistant about a large project, it often reads many files or greps blindly. Graphify builds a map first. You type /graphify in your assistant, and it writes a graph of the concepts in your code, docs, PDFs, images and video.

Code is parsed with tree-sitter into an abstract syntax tree. That step is deterministic, uses no LLM and keeps everything on your machine. Docs, PDFs, images and video get a semantic pass from your assistant's model or an API key you configure. The graph is split into communities with the Leiden algorithm.

Unlike RAG tools built on embeddings, it uses no vector store. It is a real graph you walk. Every edge is tagged EXTRACTED (stated in the source) or INFERRED (resolved by graphify), so you can see what was read and what was derived. The README reports benchmarks against mem0 and supermemory on LOCOMO. Those are the authors' own numbers.

## What it does

- **Three output files**: A run writes graph.html to explore in a browser, GRAPH_REPORT.md with key concepts and suggested questions, and graph.json with the full graph for later queries.
- **Query, path and explain**: graphify query answers a plain-language question with a small subgraph. graphify path A B traces how two things connect. graphify explain describes one concept and its links.
- **Local code parsing**: Calls, imports and inheritance are resolved across files in about 40 languages with tree-sitter. No LLM is involved and no code leaves your machine.
- **Confidence-tagged edges**: Each link is marked EXTRACTED or INFERRED, so you can judge how far to trust it.
- **Rationale and doc references**: Comments like NOTE and WHY, plus ADR and RFC citations, become nodes linked to the code they explain.

## What you could build

- Map an unfamiliar codebase to find its most connected concepts and subsystems before reading any files.
- Trace the shortest path between two classes or functions to see how they depend on each other.
- Give an AI coding assistant a graph to query so it reads fewer raw files.
- Combine code, design docs and PDFs into one graph to see how specs relate to implementation.
- Install the skill per project and commit it so a team shares the same setup.

## Who it's for

Developers who already use an AI coding assistant such as Claude Code or Cursor and work in codebases too big to hold in their head; they need Python 3.10+ and a terminal.

## Get started

Install the CLI (the PyPI package name is graphifyy, with two y's), then run graphify install to register the skill with your assistant. Open the assistant in your project and type /graphify . to build the graph. Use graph.html and GRAPH_REPORT.md to explore.

```
uv tool install graphifyy
```
```
graphify install
```
```
/graphify .
```

Tags: knowledge-graph, code-analysis, tree-sitter, claude-code, agent-skill
