> ## 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.

# Multiple repositories

> Combine Graphify Local graphs from several repositories into one cross-repo graph with merge-graphs, or keep a personal global graph of every project.

Real systems rarely live in one repository. A frontend calls an API, the API imports a shared client library, and a worker reads the same tables. Graphify Local can join separate graphs so your agent can follow a path from one repository into another.

There are two ways to do it:

| Approach | Use it for | Output |
| - | - | - |
| `merge-graphs` | A fixed set of repositories, such as one product's services | A merged `graph.json` you choose the path for |
| `global` | Every project you work on, kept up to date over time | `~/.graphify/global-graph.json` |

> [!NOTE]
>
> **Use this when** a change in one repository can break another, or when your agent keeps asking where a shared type is defined.

## How it works

**1. Build each repository**

Run `graphify extract .` (or your usual build) in each repository so each has its own `graphify-out/graph.json`.

**2. Combine**

Nodes are tagged with their repository. Unresolved calls saved during each build are matched against definitions in the other repositories, so cross-repo member calls become real edges.

**3. Re-cluster**

The combined graph is clustered as a whole, so communities can span repositories.

## See it in action

**merge-graphs**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify merge-graphs ../web/graphify-out/graph.json ../api/graphify-out/graph.json \
  --out graphify-out/merged-graph.json
graphify path "LoginForm" "create_session" --graph graphify-out/merged-graph.json
```

The default output is `graphify-out/merged-graph.json`. Pass `--previous <path>` to keep the community IDs from an earlier merge.

**global**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify global add graphify-out/graph.json --as api
graphify global list
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
Added 'api' to global graph: +3872 nodes, -0 pruned. Global: ~/.graphify/global-graph.json
Global graph: ~/.graphify/global-graph.json
  api: 3872 nodes, added 2026-10-28
```

Running `global add` again with the same tag replaces that repository's nodes. `--as` defaults to the parent folder's name.

Query the global graph by passing its path:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify query "where is the auth token validated" --graph "$(graphify global path)"
```

To pull in a public repository first, `graphify clone <github-url>` clones it locally and prints its path.

## Manage the global graph

| Command | Does |
| - | - |
| `graphify global add <graph.json> --as <tag>` | Add or update a repository |
| `graphify global remove <tag>` | Remove a repository's nodes |
| `graphify global list` | List repositories with node counts and dates |
| `graphify global path` | Print the global graph's location |

## Point your agent at it

The MCP server reads any graph file, so you can serve a merged graph:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify-mcp --graph graphify-out/merged-graph.json
```

See [MCP tools](https://docs.graphify.com/open-source/features/mcp-tools.md) for the tools it exposes.

## Verify and troubleshoot

| Symptom | Fix |
| - | - |
| No edges between repositories | Rebuild each repository with the current version so unresolved calls are saved, then merge again. |
| Duplicate nodes for a shared library | Build the library once and include its graph in the merge, instead of vendoring it. |
| Stale repository in the global graph | Run `global add` again with the same `--as` tag, or `global remove` it. |
| Community IDs change after each merge | Pass `--previous` with the last merged graph. |

> **Does merging change each repository's graph?**
>
> No. Inputs are read, not modified.

> **Is the global graph shared?**
>
> No. It's a file in your home folder.

## Run it on a second repository

These examples come from a code-only graph of the open-source [httpx](https://github.com/encode/httpx) repository, built with Graphify Local 0.9.97. Your counts will differ.

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
$ graphify global add graphify-out/graph.json --as httpx
Added 'httpx' to global graph: +2315 nodes, -0 pruned. Global: /home/box/.graphify/global-graph.json
$ graphify global list
  httpx: 2315 nodes, added 2026-10-28
$ graphify global remove httpx
Removed 'httpx' from global graph (2278 nodes pruned).
```

To combine graphs into one file without the global graph, use `merge-graphs`:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
$ graphify merge-graphs a/graphify-out/graph.json b/graphify-out/graph.json --out merged.json
Merged 2 graphs -> 4629 nodes, 9082 edges
```

Pass `--previous <path>` to keep the earlier merged community IDs. Then a later `cluster-only` run can reuse the labels.

## Add a repository while you extract

`extract` can write a project graph and merge it into the global graph in one step:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify extract . --code-only --global --as sqldemo
graphify global path
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
/home/box/.graphify/global-graph.json
```

`--as` sets the tag. Without it, the tag is the target directory's name. Use the same tag later to update or remove that repository:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
$ graphify global remove sqldemo
Removed 'sqldemo' from global graph (4 nodes pruned).
```

| Command | What it does |
| - | - |
| `global add <graph.json> [--as TAG]` | Adds or updates a project graph. |
| `global remove <tag>` | Removes that repository's nodes. |
| `global list` | Lists the repositories in the global graph. |
| `global path` | Prints the global graph's path. |
| `merge-graphs <g1> <g2> ... [--out PATH] [--previous PATH]` | Writes a merged file. The default is `graphify-out/merged-graph.json`. |

## FAQ

**Where is the global graph?** Run `graphify global path` to print it. By default it's `~/.graphify/global-graph.json`.

## What's next

> **[PR impact](https://docs.graphify.com/open-source/features/pr-impact.md)**
>
> Check what a change touches.

> **[Deduplication and resolution](https://docs.graphify.com/open-source/features/deduplication.md)**
>
> How calls are resolved.

> **[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.