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

# Vibe coding with Graphify Local

> Set up Graphify Local so your coding agent checks the knowledge graph before it greps or reads files, and the graph stays current while you code.

Vibe coding works best when the agent already knows where things are. This page sets up Graphify Local so your agent asks the graph first, reads only the files that matter, and has a fresh graph after every change.

> [!NOTE]
>
> **Use this setup when** you let an agent make broad changes across a repository and want it to stop re-reading the same files every session.

## How it works

A project install does three things:

1. **Rules.** It adds a `## graphify` section to the project's `CLAUDE.md` (or your agent's equivalent rules file). The rules tell the agent to run `graphify query` before searching, use `path` and `explain` to trace code, and run `graphify update .` after editing.
2. **Hooks.** For Claude Code it adds `PreToolUse` hooks to `.claude/settings.json`. When the agent is about to grep or read a file and a graph exists, the hook adds a reminder to use the graph.
3. **Fresh graph.** Git hooks or a file watcher rebuild the code graph as you work, with no model calls.

The hooks fail open. If anything goes wrong, they print nothing and the tool call goes ahead.

## Set it up

**1. Build the graph**

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

**2. Install the project rules and hooks**

**Claude Code**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify claude install
```

This writes the `## graphify` section to `CLAUDE.md` and these hooks to `.claude/settings.json`:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "hooks": {
    "PreToolUse": [
      { "matcher": "Bash|Grep",
        "hooks": [{ "type": "command", "command": "graphify hook-guard search", "timeout": 10 }] },
      { "matcher": "Read|Glob",
        "hooks": [{ "type": "command", "command": "graphify hook-guard read", "timeout": 10 }] }
    ]
  }
}
```

The installed command uses the absolute path to your `graphify` executable.

**Other agents**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify cursor install     # or: codex, gemini, copilot, kiro, opencode, ...
```

Run `graphify --help` to see every agent with a project install command. Hook support depends on the agent; the rules file works everywhere.

**3. Keep the graph fresh**

**Git hooks**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify hook install
```

Rebuilds after `commit`, `checkout`, `merge`, and `rebase`, and registers a merge driver so `graph.json` conflicts resolve automatically.

**Watch mode**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify watch .
```

Rebuilds the code graph as you save files. Needs the `watch` extra: `uv tool install "graphifyy[watch]"`.

## Make the graph mandatory

By default the hooks only nudge. For Claude Code you can block the agent's first raw file read in each session until it has run one `graphify query`:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify install --project --strict
```

Strict mode blocks once per session, then falls back to nudging, so the agent is never stuck. Searches and directory listings are never blocked, and a graph that is stale for the target file only nudges.

## See it in action

With the hooks installed, ask the agent something like "where do we retry failed uploads?". Instead of a chain of `grep` and `Read` calls, you should see it run:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify query "retry upload"
graphify explain "upload_with_retry()"
```

and then open only the files those commands point to. After it edits code, it runs `graphify update .` (about 6 seconds on a 98-file package) so the next question sees the change.

## Verify and troubleshoot

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify hook status
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
post-commit: installed
post-checkout: installed
post-merge: installed
post-rewrite: installed
merge driver: registered
```

| Symptom | Fix |
| - | - |
| The agent never mentions the graph | Check that `CLAUDE.md` has a `## graphify` section and `.claude/settings.json` has the hooks. Restart the agent. |
| Hooks fire but say nothing | No `graphify-out/graph.json` exists yet. Build one with `graphify extract .`. |
| Git operations feel slow | The rebuild runs in the background and logs to `~/.cache/graphify-rebuild.log`. Set `GRAPHIFY_SKIP_HOOK=1` to skip it for one command. |

## Best practices

* Commit `graph.json` and `GRAPH_REPORT.md` so every clone starts with a graph. Ignore `graphify-out/cache/`.
* Keep `--code-only` for the always-on loop. Run a full extraction with documents when they change.
* Save useful answers with `graphify save-result` so later sessions can learn from them.

## What's next

> **[Quickstart (skill)](https://docs.graphify.com/open-source/quickstart.md)**
>
> Install the skill globally for every repository.

> **[MCP server quickstart](https://docs.graphify.com/open-source/mcp-server.md)**
>
> Give agents graph tools over MCP.

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