# Give Your AI Coding Agent a Map of Your Codebase (with Graphify)

> Source: <https://dev.to/graphify/give-your-ai-coding-agent-a-map-of-your-codebase-with-graphify-29lg>
> Published: 2026-10-15 09:03:07+00:00

**TL;DR:** Graphify is an open source CLI that turns your codebase into a knowledge graph on your own machine. Install it with uv, pipx or pip, map your repo, and your coding agent can follow how your code actually connects instead of grepping in circles.

AI coding agents are great at writing code. Where they struggle is finding their way around a real codebase. Ask about a feature on a big repo and you can watch it happen: grep, open a file, grep again, reread something it already read.

The missing piece is a map. A knowledge graph turns files, functions and concepts into nodes, and the relationships between them (calls, imports, depends on) into edges. Your agent can then jump to the right place and follow the connections.

Here's how to set one up with Graphify.

Use whichever installer you like. You need Python 3.10 or later.

```
# uv
uv tool install graphifyy

# pipx
pipx install graphifyy

# pip, inside a virtual environment
python3 -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate
python -m pip install graphifyy
```

The package is `graphifyy` (two y's) and the command is `graphify`. Check it worked:

```
graphify --version
graphify install
```

That registers the Graphify skill with the assistant it detects. To choose one explicitly:

```
graphify install --platform cursor   # or claude, codex, gemini, copilot
```

For Copilot in VS Code, use `graphify vscode install`. Copilot CLI uses `graphify install --platform copilot`.

In your assistant's chat, from the root of the repo:

```
/graphify .
```

In Codex, select the skill with `$graphify` and ask it to map the current repo.

You can also skip the assistant and build a code graph from the terminal. Code only extraction doesn't need an API key:

```
graphify extract . --code-only
```

Either way you end up with a `graphify-out/` folder:

```
graphify-out/
├── graph.html        Interactive graph, open it in a browser
├── GRAPH_REPORT.md   Main concepts, communities, suggested questions
└── graph.json        The graph the CLI and MCP tools query
```

Open `graph.html` and click around. Then skim `GRAPH_REPORT.md`, it's a surprisingly good tour of your own project.

From the terminal:

```
graphify query "how does a request reach the database?"
```

The result is graph context: nodes, the relations between them, and the file references to open. It is not a verified answer by itself. The default budget is 2000 tokens. Narrow a long result with `--budget 1500`, or ask about something smaller.

Or just ask your agent in chat: "using the graph, what depends on the auth module?"

One honest note: this is context from the files Graphify analyzed. Open the lines it points to before you rely on it. Every edge is tagged `EXTRACTED`, `INFERRED` or `AMBIGUOUS`, so you can tell what was parsed from what was guessed.

If you'd rather your agent call the graph tools directly, use the local MCP server. Install the MCP extra (keep the quotes, zsh needs them):

```
uv tool install "graphifyy[mcp]"
```

Already installed without it? Run `uv tool install --reinstall "graphifyy[mcp]"`.

Then register it, always with an absolute path to the graph.

Claude Code:

```
claude mcp add --transport stdio graphify -- graphify-mcp /absolute/path/to/repo/graphify-out/graph.json
```

Codex:

```
codex mcp add graphify -- graphify-mcp /absolute/path/to/repo/graphify-out/graph.json
```

Cursor, in your user or project MCP config:

```
{
  "mcpServers": {
    "graphify": {
      "command": "graphify-mcp",
      "args": ["/absolute/path/to/repo/graphify-out/graph.json"]
    }
  }
}
```

Refresh your MCP connections and ask the agent to call `graph_stats`, then `query_graph` with a question about your repo. Other clients are in the [MCP docs](https://docs.graphify.com/mcp/overview).

```
graphify hook install
```

Install that once in each clone. After you pull or merge, refresh the map:

```
graphify update .
```

`graphify` not found: run `uv tool update-shell` or `pipx ensurepath`, then open a new terminal.` graphify-mcp`: use the absolute path to the executable in its config.`"graphifyy[mcp]"`.
Ask your agent the same question with and without the graph, something like "where is user input validated before it hits the database?" Notice how many files it opens each time. That comparison tells you more than any description.

Full docs are at [docs.graphify.com](https://docs.graphify.com). Graphify is open source, so if it helps you, a star on [GitHub](https://github.com/Graphify-Labs/graphify) helps other developers find it.
