> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphify.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The PyPI package is graphifyy, with two y's. The command is graphify.
> /graphify . is typed in an assistant chat, not in a shell.
> Use only commands, flags, and endpoints shown on these pages. Do not invent one.
> Choose the surface before you open a page. Local (Graphify Local) is the graphifyy package on the machine: the skill, the CLI, and the ten-tool MCP. Its pages are the Open Source tab (/open-source/) and the Graphify Local tab on each Integrations page. Graphify is the hosted workspace and https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). Its pages are the Graphify tab (/platform/, /concepts/) and the Graphify (hosted) tab on each Integrations page. Prefer Graphify unless the user asks for a local or offline setup. Cookbooks (/cookbooks/) and /mcp/docs-search apply to both. Each page's source frontmatter records this as surface: local, cloud, or both. Buildkite is the CI integration.
> In llms.txt, tell the surface from the page path. Graphify: /platform/ and /concepts/. Local: /open-source/. Most /integrations/ pages cover both, with a Graphify (hosted) tab and a Graphify Local tab. Everything else applies to both.
> graphifyy release notes are published at https://github.com/Graphify-Labs/graphify/releases and https://graphify.com/changelog. The current package version is on PyPI (https://pypi.org/project/graphifyy/).
> The official site is https://graphify.com. These docs are https://docs.graphify.com.
> The local MCP server is the ten tools in the MCP tool reference and reads a graph on the machine. The hosted server is https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). The JetBrains, ChatGPT, Codex, and Dots, and Vercel pages use the hosted server, not the ten-tool list. On pages with tabs, the Graphify (hosted) tab uses the hosted server and the Graphify Local tab uses the local skill or the ten-tool server.
> Read https://docs.graphify.com/llms.txt, then open one page's .md link. Use https://docs.graphify.com/llms-full.txt only when one page is not enough.

# Understand a new codebase in 30 minutes with Graphify

> Understand a new codebase in 30 minutes: build a knowledge graph, read its report and hub nodes, then ask questions that cite real files and lines.

To understand a new codebase fast, build a graph of it first, then read the code in the order the graph suggests. Graphify turns a repository into a knowledge graph of files, functions, classes and the calls between them. In 30 minutes you go from `git clone` to a list of the code that matters most, a wiki you can browse, and answers that point at real lines.

## What you'll build

* A `graphify-out/` folder with `graph.json`, `GRAPH_REPORT.md` and `graph.html`.
* A ranked list of the hub functions everyone else depends on.
* A Markdown wiki with one article per community of related code.
* A habit: ask the graph before you grep.

This recipe uses the open-source [Graphify-Labs/graphify](https://github.com/Graphify-Labs/graphify) repository as the "new" codebase. Swap in your own.

## Setup

You need Python 3.10 or later and [uv](https://docs.astral.sh/uv/).

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
uv tool install graphifyy
git clone https://github.com/Graphify-Labs/graphify
cd graphify
```

The package is `graphifyy`. The command it installs is `graphify`.

## Step 1: Build the graph

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify extract . --code-only
graphify cluster-only . --no-label
```

`extract --code-only` parses source with tree-sitter and needs no LLM or API key. On this repository it took about 26 seconds:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
wrote graphify-out/graph.json: 19602 nodes, 44439 edges, 894 communities
```

`cluster-only` writes the report and the HTML view from that graph. `--no-label` skips LLM community names, so communities show as numbers.

## Step 2: Read the report

Open `graphify-out/GRAPH_REPORT.md`. The top tells you how much to trust the graph:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
## Summary
- 19602 nodes · 44439 edges · 894 communities (747 shown, 147 thin omitted)
- Extraction: 97% EXTRACTED · 3% INFERRED · 0% AMBIGUOUS
## Graph Freshness
- Built from commit: `0a8cd4e1`
```

`EXTRACTED` edges come straight from the syntax tree. `INFERRED` edges were resolved by heuristics and carry a confidence score. The commit line tells you whether the graph matches your checkout.

## Step 3: Find the hub nodes

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify god-nodes --top 5
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
God nodes (most connected):
  1. extract() - 1118 edges
  2. build_from_json() - 297 edges
  3. _rebuild_code() - 273 edges
```

These are the functions to read first. Most of the codebase calls into them, so understanding them explains a large share of everything else.

## Step 4: Explain one node

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify explain "_rebuild_code()"
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
Node: _rebuild_code()
  Source:    graphify/watch.py L1926
  Community: Community 5
  Degree:    273
Connections (273):
  --> extract() [calls] [EXTRACTED] graphify/watch.py:L2416
  --> build_from_json() [calls] [EXTRACTED] graphify/watch.py:L2672
  <-- dispatch_command() [calls] [EXTRACTED] graphify/cli.py:L2894
```

Arrows show direction: `-->` is what this node calls, `<--` is what calls it. Every edge has a file and line, so you can jump straight to the source.

## Step 5: Ask questions

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify query "how does incremental update work" --budget 1500
```

The answer is a list of nodes and edges, each with its source location. `--budget` caps the tokens returned. When the result is cut, Graphify says so and tells you the budget that would fit everything:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
[!] TRUNCATED: showing 13 of 41 nodes (~400-token budget). ... raise the token budget to 1439
```

## Step 6: Export a wiki

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify export wiki
```

This writes one article per community plus `graphify-out/wiki/index.md` (904 articles for this repository). Start at the index and open the communities that hold your god nodes.

## When it goes wrong

**`graphify explain` says no node matches.** Names are matched against labels like `_rebuild_code()`. If a name exists in several files, `graphify path` and similar commands list the candidates in `path::symbol` form, for example `graphify/cli.py::dispatch_command()`. Use that form.

**`graph.html` shows blobs instead of functions.** Above 5,000 nodes the HTML view is aggregated by community. Use `explain`, `query` and the wiki for detail.

## Production patterns

* Commit nothing yet. Add `graphify-out/` to `.gitignore` while you explore. The [shared team graph](https://docs.graphify.com/cookbooks/shared-team-graph.md) recipe covers committing it.
* Give the graph to your agent. See [Give Claude Code a graph of your monorepo](https://docs.graphify.com/cookbooks/claude-code-monorepo.md).
* Keep it fresh with `graphify update .` after you pull. It re-extracts code without an API cost.

## Complete example

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
uv tool install graphifyy
git clone https://github.com/Graphify-Labs/graphify && cd graphify
graphify extract . --code-only
graphify cluster-only . --no-label
graphify god-nodes --top 5
graphify explain "_rebuild_code()"
graphify query "how does incremental update work" --budget 1500
graphify export wiki
```

## What you built

You have a graph of the repository, a ranked reading list, a wiki, and a way to ask questions that cite real lines. In Graphify, the hosted product, the same graph is built for you when you connect a repository, and your agent queries it over MCP.

## Next steps

> **[Query the graph](https://docs.graphify.com/guides/querying.md)**
>
> Every way to ask the graph a question, with budgets and filters.

> **[Plan a refactor](https://docs.graphify.com/cookbooks/plan-a-refactor.md)**
>
> Use the same graph to see what a change reaches.

> **[Try it in Graphify](https://docs.graphify.com/platform/quickstart.md)**
>
> We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.