Graphify
An open-source, on-device knowledge graph for code that allows AI coding assistants to reason over repository structure instead of using fuzzy search or grep.
Graphify is an open-source tool created by Graphify Labs that transforms your entire codebase into a structured knowledge graph. By mapping files, functions, classes, and their relationships, it provides AI coding assistants with a persistent architecture model to reason over, rather than relying on simple text search or fuzzy chunks. Designed to be completely on-device, Graphify ensures that your source code remains private, performing local parsing with tree-sitter grammars without telemetry or cloud-based indexing.
Functionality includes mapping repositories into a queryable graph that AI assistants can traverse to provide grounded, audit-able answers. It enables users to replace traditional grepping with structured semantic queries, allowing agents to understand dependencies, trace paths, and explain code structure with high precision. Every generated answer includes file and line-level citations, with relationship edges explicitly tagged as extracted, inferred, or ambiguous to help users evaluate the model's confidence.
Some of the key features are:
- On-Device Processing: Analyzes code using 36 built-in tree-sitter grammars locally without sending data to external servers.
- Structured Queries: Allows AI assistants to traverse graph nodes and relationships to answer complex, multi-hop architectural questions.
- Provenance Tracking: Tags every relationship with evidence types like extracted or inferred, providing transparency in AI responses.
- Broad Compatibility: Works as a skill package within 17 different AI coding assistants, including Cursor, Claude Code, GitHub Copilot, and Aider.
- MCP Support: Includes an Model Context Protocol (MCP) server for integration with various developer environments.
- PR Triage: Maps open pull requests onto the graph to identify touch-points, merge-conflict risks, and review priorities.
- Apache 2.0 Licensing: Fully open-source and auditable, ensuring transparency and security for all users.
Operation begins by installing the graphifyy package and registering it as a skill with your preferred coding assistant. Running a single command like /graphify . in the assistant terminal maps the repository into machine-readable files such as graph.json. Once indexed, you can query the codebase in plain English, and the assistant uses the generated graph to inform its logic, significantly reducing token consumption and improving the accuracy of code analysis compared to conventional retrieval-augmented generation (RAG) approaches.
Some common use cases include:
- Onboarding New Developers: Helping new hires understand codebase architecture by querying the graph to find ownership, dependencies, and service maps.
- AI Token Reduction: Minimizing the volume of irrelevant code sent to LLMs by providing structured context through a graph.
- PR Code Reviews: Automating the triage of pull requests to detect overlapping changes and potential merge conflicts before they reach production.
- Refactoring Support: Using the graph to identify all dependents when modifying a core function or class, thereby preventing accidental regressions.