@techNmak - Graphify Maps Codebases
@techNmak on X Graphify is an open-source GitHub project that parses a codebase once into a persistent knowledge graph, so AI coding agents can trace how functions, files and services connect instead of repeatedly grepping and re-reading source. It plugs into assistants like Claude Code, Codex and Cursor through hooks, instructions or MCP.
- It uses tree-sitter to parse about 40 languages locally, extracting functions, classes, imports, calls and cross-file relationships without embeddings, a vector database or LLM calls.
- Every relationship is tagged EXTRACTED, INFERRED or AMBIGUOUS, and community detection surfaces related subsystems and central nodes.
- The graph can be committed to Git, updated incrementally, and checked against pull requests to flag changes that touch related areas.
Graphify is a GitHub repo, reportedly at around 135K stars, built on a simple premise: a coding agent should map a codebase once into a persistent knowledge graph rather than re-grepping and re-reading files every session. The graph links functions, classes, files, SQL schemas, infrastructure configs, docs, PDFs, images and videos as connected nodes. The payoff is that an agent can ask questions like "trace the path from UserService to DatabasePool" or "which components are central to this architecture" and get back graph relationships and paths instead of a pile of keyword hits. That matters because the usual workflow, search, open a dozen files, follow imports, and lose the thread as the context window fills, is expensive and error-prone in large repos.
The most technically interesting part is how the code graph gets built. Graphify uses tree-sitter to parse roughly 40 languages locally, pulling out functions, classes, imports, calls, inheritance and cross-file relationships. No embeddings, vector database or LLM calls are needed for this step, which keeps it cheap, fast and private. Non-code material like PDFs and images can go through an optional semantic extraction pass using a model you configure. Every edge gets a confidence label: EXTRACTED for relationships stated explicitly in the source, INFERRED for ones derived through analysis or resolution, and AMBIGUOUS for uncertain links flagged for human review. The tool also runs community detection to group related subsystems and surfaces highly connected nodes that likely matter architecturally.
What makes it practical for agents is the integration layer. Graphify plugs into Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot and over 20 other assistants, installing hooks or persistent instructions that nudge the agent to query the graph before falling back to file search. The graph can be committed to Git, updated incrementally as files change, and exposed over MCP. It can also check pull requests against the graph, flagging PRs that touch related communities and so deserve closer review. Output comes in three forms: an interactive HTML graph, a Markdown architecture report, and a reusable graph.json. The repo is at github.com/Graphify-Labs/graphify.