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

# Graphify CLI reference

> Every graphify command and flag in Graphify Local: build, query, explain, path, affected, clustering, memory, exports, hooks, and agent installs.

The package is `graphifyy` and the command is `graphify`. Run commands from your project root; every reading command looks for `graphify-out/graph.json` unless you pass `--graph PATH`. This page is checked against `graphify --help` for version 0.9.97. Run `graphify --version` to see yours.

> [!NOTE]
>
> **Skill or command?** `/graphify .` is a message to your coding agent, which then runs these commands for you. `graphify extract .` is the shell command itself. Both write the same `graphify-out/` folder.

## Commands at a glance

| Task | Command |
| - | - |
| Build a graph | [`extract`](#extract), `update`, `watch` |
| Ask the graph | [`query`](#query), [`explain`](#explain), [`path`](#path), [`affected`](#affected), `god-nodes` |
| Communities | [`cluster-only`, `label`](#clustering-and-labels) |
| Work memory | [`save-result`, `reflect`](#work-memory) |
| Outputs | [`export`](#exports), `tree`, `benchmark` |
| Many repositories | [`global`, `merge-graphs`, `clone`](#many-repositories) |
| Automation | [`hook`](#hooks-and-agents), `<agent> install`, `check-update` |
| Models | `provider`. See [LLM providers](https://docs.graphify.com/open-source/configuration/llm-providers.md) |

`query`, `path`, and `explain` exit `0` with an answer, `3` when a name matches several nodes (the candidates are printed), and `4` when nothing matches. Scripts can branch on these codes.

## graphify extract

Headless build for CI and scripts: tree-sitter parsing for code, plus semantic extraction for docs, papers, and images.

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

| Flag | Default | What it does |
| - | - | - |
| `--code-only` | off | Index code only. No model or API key needed. |
| `--backend B`, `--model M` | auto-detect | Choose the model for semantic extraction. |
| `--mode deep` | off | More aggressive `INFERRED` edges from semantic extraction. |
| `--exclude PATTERN` | none | Skip matching paths. Repeatable, anchored at the root. |
| `--no-gitignore` | off | Ignore `.gitignore` and `.git/info/exclude`. |
| `--force` | off | Full re-scan, skipping incremental and semantic caches. |
| `--max-workers N` | CPU count | AST processes. |
| `--token-budget N` | `60000` | Token cap per semantic chunk. |
| `--max-concurrency N` | `4` | Parallel semantic chunks. Use `1` for local models. |
| `--api-timeout S` | `600` | Seconds per model request. |
| `--out DIR` | the scan path | Write `<DIR>/graphify-out/`. |
| `--no-cluster` | off | Skip clustering and write the raw extraction. |
| `--google-workspace` | off | Export Google Docs, Sheets, and Slides shortcuts first. |
| `--postgres DSN` | none | Add tables, views, functions, and foreign keys from a live PostgreSQL database. |
| `--cargo` | off | Add crate-to-crate dependencies from `Cargo.toml`. |
| `--global`, `--as TAG` | off | Also merge the result into the global graph. |

`graphify update <path>` re-extracts changed code without a model, and `graphify watch <path>` does it on every save. Both accept `--force` and `--no-cluster`. See [Incremental updates](https://docs.graphify.com/open-source/features/incremental-updates.md).

## graphify query

Traverses the graph from the nodes whose labels match words in your question.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify query "cluster leiden" --budget 1000
```

| Flag | Default | What it does |
| - | - | - |
| `--budget N` | `2000` | Cap the answer at N tokens. |
| `--dfs` | breadth-first | Follow one branch deep instead of the nearest neighbors. |
| `--seed X` | keyword matches | Start at a node id, label, or file path. Repeatable. |
| `--context C` | all | Only follow edges with this context. Repeatable. |
| `--graph PATH` | `graphify-out/graph.json` | Graph to read. |

Matching uses label words, not full sentences. If you get exit code `4`, use names from your code.

## graphify explain

A plain-language summary of one node and its neighbors.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify explain "build_graph"
graphify explain "build_graph" --all
```

By default, the 20 most connected neighbors are listed; `--all` lists every connection.

## graphify path

The shortest path between two nodes.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify path "extract" "cluster"
```

The search follows edge direction by default. Pass `--undirected` to ignore direction; `--directed` forces the default.

## graphify affected

Walks edges in reverse to find what depends on a node.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify affected "load_config" --depth 3 --relation calls
```

`--depth` defaults to `2`. `--relation` is repeatable. `graphify god-nodes --top 10 [--json]` lists the most connected nodes.

## Clustering and labels

| Command | What it does |
| - | - |
| `graphify cluster-only <path>` | Re-cluster an existing graph and rewrite the report. Flags: `--no-viz`, `--no-label`, `--backend`, `--model`, `--max-concurrency` (default 4), `--batch-size` (default 100). |
| `graphify label <path>` | Rename communities with the model. `--missing-only` keeps existing names. |

## Work memory

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify save-result --question "Where is auth checked?" \
  --answer "middleware.verify_session" --nodes verify_session \
  --outcome useful
graphify reflect
```

`--outcome` is `useful`, `dead_end`, or `corrected` (with `--correction TEXT`). `reflect` writes `graphify-out/reflections/LESSONS.md`; `--half-life-days` (default 30) and `--min-corroboration` (default 2) tune it. See [Work memory](https://docs.graphify.com/open-source/features/work-memory.md).

## Exports

| Command | Output |
| - | - |
| `graphify export html` | `graph.html` (`--node-limit`, default 5000) |
| `graphify export callflow-html` | Mermaid architecture and call-flow page |
| `graphify export obsidian` | Obsidian vault notes and canvas |
| `graphify export wiki` | Markdown wiki articles |
| `graphify export svg`, `graphml` | `graph.svg`, GraphML |
| `graphify export neo4j`, `falkordb` | Cypher, or `--push URI` to a database |
| `graphify tree` | `GRAPH_TREE.html` collapsible tree |
| `graphify benchmark` | Token use of the graph versus reading every file |

For database pushes, set `NEO4J_PASSWORD` or `FALKORDB_PASSWORD` instead of passing `--password`, so it stays out of your shell history. See [Exports](https://docs.graphify.com/open-source/features/exports.md).

## Many repositories

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify global add graphify-out/graph.json --as api
graphify global list
graphify merge-graphs a.json b.json --out combined.json
graphify clone https://github.com/Graphify-Labs/graphify
```

`global remove TAG` drops a repository; `global path` prints the global graph's location (`~/.graphify/global-graph.json`).

## Hooks and agents

| Command | What it does |
| - | - |
| `graphify hook install` | Add post-commit, post-checkout, post-merge, and post-rewrite hooks, plus a merge driver for `graph.json`. `status` and `uninstall` too. |
| `graphify install [--platform P]` | Copy the skill for your agent. `uninstall` removes it everywhere (`--purge` also deletes `graphify-out/`). |
| `graphify claude install`, `cursor install`, `codex install`, and so on | Write the agent's rules file and, where supported, a hook that points it at the graph. |
| `graphify check-update <path>` | Cron-safe check for pending semantic re-extraction. |
| `graphify prs` | Pull request dashboard. See [PR impact](https://docs.graphify.com/open-source/features/pr-impact.md). |
| `graphify add <url>` | Save a web page to `./raw` and update the graph. |

## Verify and troubleshoot

| Symptom | Fix |
| - | - |
| `error: graph file not found` | Run `graphify extract .` first, or pass `--graph`. |
| Exit code `3` | Several nodes matched. Use a printed candidate or a file path. |
| A flag here is missing | Your version is older. Run `pip install -U graphifyy`. |

## What's next

> **[Environment variables](https://docs.graphify.com/open-source/configuration/environment-variables.md)**
>
> Settings for output, models, and hooks.

> **[Ignoring files and limits](https://docs.graphify.com/open-source/configuration/ignoring-files.md)**
>
> Control what gets scanned.

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