Skip to content

BlogGuides

Graphify CLI commands: a reference, explained

· 4 minute read

The Graphify CLI commands are the terminal commands that build a code knowledge graph, query it, and wire it into AI coding assistants. This reference groups every command in Graphify 0.8.33 by the job it does. It lists each command with the flags you are most likely to need.

How do you install the CLI?Link to How do you install the CLI?

Install the graphifyy package with uv, then check the help. The PyPI package name has two y's, but the command is graphify. Run graphify --help to see the full list for your installed version. This reference was checked against the --help output of version 0.8.33, released in June 2026.

bash
uv tool install graphifyy
graphify --help

Which commands build the graph?Link to Which commands build the graph?

graphify update . builds or refreshes the graph from code, locally and with no model. graphify watch . rebuilds on file changes. graphify extract runs the full pipeline, including docs and media, with a model backend. Supported backends are gemini, kimi, claude, openai, deepseek and ollama. All builds write to graphify-out/.

| Command | What it does | Useful flags | |---|---|---| | update <path> | Rebuild code graph, no model | --force, --no-cluster | | watch <path> | Rebuild on change | | | extract <path> | Full extraction with a model | --backend, --mode deep, --token-budget, --out | | cluster-only <path> | Rerun clustering only | --no-viz, --no-label | | label <path> | Name communities | |

Which commands query the graph?Link to Which commands query the graph?

graphify query traverses the graph for a question and returns the relevant nodes and edges. It uses breadth-first search by default, --dfs for depth-first, and --budget to cap output at 2,000 tokens by default. graphify path prints the shortest chain between two symbols. graphify explain lists one symbol's neighbours with file and line.

bash
graphify query "how does auth work?" --budget 1000
graphify path "Client" "HTTPTransport"
graphify explain "Response"

How do you check the impact of a change?Link to How do you check the impact of a change?

Use graphify affected on the symbol you plan to change. It walks edges such as calls, imports and inheritance up to --depth, which defaults to 2. Narrow it with --relation. Each result shows the relation and the file and line, so you can open the code directly. Read the INFERRED edges before you trust them.

Which commands export or visualize?Link to Which commands export or visualize?

graphify tree writes a collapsible D3 view to GRAPH_TREE.html, with --root and --max-children to trim it. graphify export callflow-html writes a Mermaid-based call-flow page. graphify benchmark measures token reduction versus reading the full corpus. graphify save-result saves a question and answer to graphify-out/memory/ as feedback for the graph.

Which commands handle several repositories?Link to Which commands handle several repositories?

graphify merge-graphs combines two or more graph.json files with --out for the result. graphify global add, remove, list and path manage a cross-project graph in your home folder. graphify clone clones a GitHub repository locally, and graphify add <url> fetches a URL into ./raw and updates the graph. graphify merge-driver union-merges graph.json files during git merges.

Which commands set up assistants and hooks?Link to Which commands set up assistants and hooks?

graphify install copies the skill into your assistant's config, with --platform for tools such as codex, cursor or aider, and graphify uninstall --purge removes it. graphify gemini install sets up Gemini CLI. graphify hook install adds post-commit and post-checkout git hooks, with status and uninstall. graphify check-update reports when semantic re-extraction is pending, and is safe to run from cron.

FAQLink to FAQ

Is the command graphify or graphifyy?Link to Is the command graphify or graphifyy?

The command is graphify. The package you install is graphifyy.

Which command needs no API key?Link to Which command needs no API key?

graphify update and the query commands run locally with no model.

How do I limit query output size?Link to How do I limit query output size?

Pass --budget to graphify query. The default is 2,000 tokens.

Can I rebuild the graph after every commit?Link to Can I rebuild the graph after every commit?

Yes. Run graphify hook install to add post-commit and post-checkout hooks.

Where is the full flag list?Link to Where is the full flag list?

Run graphify --help, or read the CLI configuration docs.

Get startedLink to Get started

Graphify is open source on GitHub. Install it with uv: uv tool install graphifyy. Read the CLI quickstart and the querying docs. The blast radius glossary entry explains impact checks. Related: monorepo context for AI coding agents. See also how to understand a legacy codebase in a day.

Try Graphify now.

Try for free