Your first knowledge graph.
From a fresh terminal to querying your codebase as a graph. About five minutes, entirely on your machine.
What you need
Python 3.10+, a repo you want to map, and an AI coding assistant (Claude Code, Cursor, Codex, Gemini CLI, or any of the 20+ supported ones). No account, no API key: the structural graph is pure on-device parsing, and the semantic pass runs through the assistant session you already have.
01Install & register
Install the CLI from PyPI (package graphifyy, command graphify), then register the /graphify skill with your assistant. Hit a snag here? The install guide covers pipx, plain pip, PATH fixes, and every per-assistant command.
$ uv tool install graphifyy✓ installed graphify $ graphify install✓ /graphify skill registered # not on Claude Code? name your assistant:# graphify cursor install · graphify codex install · graphify gemini install02Build the graph
Open your assistant in the repo and run /graphify . It parses the code with tree-sitter (36 languages, plus Markdown, SQL, and more), extracts nodes and relationships, groups them into communities, and writes everything to graphify-out/. Size the wait to the repo: small projects finish in minutes.
# inside your assistant (Codex users: $graphify instead of /graphify)/graphify . ✓ graphify-out/graph.html interactive graph✓ graphify-out/GRAPH_REPORT.md architecture report✓ graphify-out/graph.json machine-readable graph03The output files
Three files, each for a different reader. Start with graph.html for the overview, skim GRAPH_REPORT.md for the highlights (it ends with suggested questions worth asking), and leave graph.json to the tools. The directory is designed to be committed, so a teammate who pulls gets the map without rebuilding.
graphify-out/├── graph.html open in any browser: click nodes, filter, search├── GRAPH_REPORT.md key concepts, surprising connections, suggested questions└── graph.json the full graph; every CLI and MCP query reads this file04Query from the CLI
Ask in plain English. Answers are explicit paths with file:line citations, and every edge is tagged EXTRACTED, INFERRED, or AMBIGUOUS so you know what is grounded in code and what is a guess.
$ graphify query "what connects auth to the database?"AuthService → SessionStore → DatabasePool [EXTRACTED] src/auth/service.py:42 → src/db/pool.py:17 $ graphify path "UserService" "DatabasePool"UserService → UserRepository → DatabasePool (2 hops) $ graphify explain "RateLimiter"RateLimiter · class · src/middleware/rate_limit.pycalled by ApiGateway, WebhookHandler · calls RedisClientEvery command and flag (including --dfs, --budget, and the PR dashboard) is in the CLI reference.
05Query from your assistant
The same queries work inside the assistant through the skill. For native tool calls instead of shell-outs, serve the graph over MCP: 10 tools including query_graph, shortest_path, and triage_prs. The MCP server page has copy-paste config for each assistant.
# ask through the skill, in your assistant's chat:/graphify query "how does a request reach the cache?"/graphify path "ApiGateway" "RedisClient"/graphify explain "SessionStore" # or expose the graph over MCP so tools are called natively:$ python -m graphify.serve graphify-out/graph.json# (requires the mcp extra: uv tool install "graphifyy[mcp]")06Keep it fresh
The graph is a snapshot, so refresh it as the code moves. --update re-scans only what changed; watch and the git hook automate it. The AST-only rebuilds need no model at all.
# re-scan only what changed since the last run:/graphify . --update # rebuild the code graph on save (no LLM needed):$ graphify watch . # or auto-rebuild after each commit:$ graphify hook installNext steps
From here: the CLI reference for every command, the MCP server to wire the graph into your assistant natively, and concepts for how the graph itself is built (nodes, edges, communities, confidence tags).