Skip to main content

Gemini CLI: how to connect Graphify

By Steven Van ·

Graphify's local setup for Gemini CLI needs no account: two install commands, then /graphify . builds a graph with file:line citations.

Gemini CLI can now query a code knowledge graph of the repository, built and stored on the local machine. Graphify published a setup guide for the connection. This path needs no Graphify account.

Install

The requirements are Python 3.10 or later, uv or pipx, and a Gemini CLI that already answers a normal prompt. Model access stays with Google. The install is two commands:

  • uv tool install graphifyy (or pipx install graphifyy)
  • graphify gemini install

The docs write the same registration as graphify install --platform gemini. Running graphify gemini install --project from the project root keeps the skill in the repo at .gemini/skills/graphify/SKILL.md, so it can be committed.

What the installer writes

The installer adds a skill, a section of GEMINI.md, and one hook. On an existing GEMINI.md it replaces only the section headed ## graphify. That section tells the model to run graphify query, graphify path and graphify explain when graphify-out/graph.json exists.

The hook is a BeforeTool entry in .gemini/settings.json. Before read_file or list_directory, Gemini CLI runs graphify hook-guard gemini. If the graph exists, the hook attaches a reminder to query it, and the read still goes ahead. If not, the hook stays quiet. After an upgrade, run the install again so the hook picks up the current executable path.

Build and query the graph

In Gemini CLI, select the Graphify skill and enter /graphify .. This writes graphify-out/graph.json, plus graph.html and GRAPH_REPORT.md. Code is parsed locally with tree-sitter, while docs and PDFs are read by the model already in use in Gemini CLI.

Questions can be asked in the session, such as which modules read the payment config and through what path. From a terminal, graphify query "authentication flow" works once the graph exists. Answers cite file:line. Each edge is tagged EXTRACTED (found by the parser), INFERRED (connected by a model) or AMBIGUOUS (evidence did not resolve). Graphify advises opening the cited file before relying on an answer.

After code changes, graphify update . re-extracts the changed files, and graphify hook install adds post-commit and post-checkout git hooks that run the same update.

Graphify Cloud and troubleshooting

Graphify Cloud uses a different install. The extension points Gemini CLI at the hosted server https://api.graphify.com/mcp: run gemini extensions install https://github.com/Graphify-Labs/Graphify-gemini-extension, start a new session, then run /mcp auth graphify and sign in through the browser. The repository must be indexed in Graphify Cloud first.

The guide also covers common problems, such as graphify: command not found (run uv tool update-shell or pipx ensurepath) and a graph stored elsewhere (set GRAPHIFY_OUT). graphify gemini uninstall removes the Gemini CLI registration.

Graphify
Graphify
Turn a codebase into a knowledge graph your AI assistant can trace — answers come back as graph paths with real file:line citations.
View Graphify →
Sources

Original source

Read Gemini CLI: how to connect Graphify on Creators Toolbox