0Pricing

Graphify: Turn Your Codebase Into a Queryable Knowledge Graph for AI Coding Assistants

Learn how Graphify transforms your entire codebase into a structured knowledge graph that AI coding assistants like Claude Code, Cursor, and Codex can query for instant architecture answers.

C
CoddyKit Team · 8 min read · 1,648 words
Graphify: Turn Your Codebase Into a Queryable Knowledge Graph for AI Coding Assistants
Quick Answer: Graphify is an open-source tool that transforms your entire codebase—code, docs, SQL schemas, images, and videos—into a queryable knowledge graph for AI coding assistants like Claude Code, Cursor, Codex, and Gemini CLI. Install with uv tool install graphifyy, run /graphify ., and your AI assistant can answer architecture questions by querying a graph instead of grepping through files. It supports 36 programming languages, auto-rebuilds on git commits, and integrates with 20+ AI platforms.

Why AI Coding Assistants Struggle With Large Codebases

Every developer who has used Claude Code, Cursor, GitHub Copilot, or Codex has hit the same wall: your AI assistant doesn't really understand your codebase. It can read individual files, search for patterns, and generate code snippets—but it can't see the forest for the trees.

The problem is context. A typical application has dozens of modules, hundreds of files, and thousands of relationships between components. Auth flows connect to databases, API routes call services, services depend on utilities, and infrastructure configs reference environment variables. No amount of grep or file reading captures these relationships.

Graphify solves this by building a knowledge graph of your entire project. Instead of asking your AI assistant to read files one by one, it queries a structured graph that knows how everything connects.

What Graphify Actually Does

When you run /graphify . in your project, the tool performs three operations:

  1. Local AST extraction — Parses code files using tree-sitter grammars (36 languages supported, zero API calls)
  2. AI-powered semantic analysis — Extracts relationships, dependencies, and design rationale from code, docs, and media
  3. Graph construction — Builds a queryable knowledge graph with nodes (concepts, files, functions) and edges (relationships, dependencies, calls)

The output is three files:

graphify-out/
├── graph.html          # Interactive visualization (click nodes, filter, search)
├── GRAPH_REPORT.md     # Highlights: god nodes, surprising connections, suggested questions
└── graph.json          # Full graph data — query it anytime

The GRAPH_REPORT.md file surfaces what the graph found: the most-connected concepts in your project ("god nodes"), unexpected links between files or modules, inline design rationale from comments like # WHY: and # HACK:, and 4-5 questions the graph is uniquely positioned to answer.

Installation and Setup Across Platforms

Graphify works as a skill for virtually every AI coding assistant on the market. Here's how to get started:

Step 1: Install the Package

# Recommended (isolated environment):
uv tool install graphifyy

# Alternatives:
pipx install graphifyy
pip install graphifyy

Note: The PyPI package is graphifyy (double-y), but the CLI command is graphify.

Step 2: Register the Skill With Your AI Assistant

graphify install                    # Claude Code (default)
graphify install --platform codex   # OpenAI Codex
graphify install --platform opencode # OpenCode
graphify cursor install             # Cursor
graphify install --platform gemini  # Gemini CLI
graphify install --platform kilo    # Kilo Code

Graphify supports 20+ platforms including Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code Copilot Chat, Aider, Amp, Trae, and more. Each platform gets a tailored integration—hooks for Claude Code and Gemini CLI, persistent instruction files for others.

Step 3: Build Your First Graph

/graphify .

That's it. Your AI assistant now has a structured map of your entire project.

Querying the Knowledge Graph

Once your graph is built, you can ask your AI assistant to query it instead of reading files manually:

/graphify query "what connects auth to the database?"
/graphify path "UserService" "DatabasePool"
/graphify explain "RateLimiter"

These queries return structured answers based on the graph, not on file-by-file reading. The difference is profound: instead of your assistant guessing which files to read, it follows actual relationships in the graph.

Confidence Tags

Every relationship in the graph is tagged with its confidence level:

  • EXTRACTED — Directly found in code or documentation
  • INFERRED — Deduced from patterns and context
  • AMBIGUOUS — Uncertain, needs human verification

This transparency means you always know what was found versus what was guessed.

Advanced Features: Git Hooks, PR Dashboards, and Extras

Auto-Rebuild on Git Commits

graphify hook install

This installs a post-commit hook that automatically rebuilds your graph whenever you commit changes. Your graph stays current without manual intervention.

PR Dashboard

graphify prs              # CI state, review status, worktree mapping
graphify prs 42           # Deep dive on PR #42 with graph impact
graphify prs --triage     # AI ranks your review queue
graphify prs --conflicts  # PRs sharing graph communities — merge-order risk

The PR dashboard uses the knowledge graph to surface which PRs touch related code, helping you prioritize reviews and avoid merge conflicts.

Optional Extras

Graphify is modular. Install only what you need:

uv tool install "graphifyy[pdf]"       # PDF extraction
uv tool install "graphifyy[video]"     # Video/audio transcription
uv tool install "graphifyy[postgres]"  # Live PostgreSQL introspection
uv tool install "graphifyy[terraform]" # Terraform/HCL extraction
uv tool install "graphifyy[all]"       # Everything

The PostgreSQL extra is particularly powerful: it introspects your live database and adds schema relationships to the graph, so your AI assistant understands how application code connects to database tables.

Real-World Example: Onboarding to a New Codebase

Imagine you're joining a team working on a SaaS application with 150+ files across TypeScript, Python, and SQL. The codebase has been growing for two years, and documentation is scattered across README files, inline comments, and a few Confluence pages.

Without Graphify: You spend days reading files, asking colleagues questions, and building a mental model of the architecture. You miss connections between modules, don't understand why certain patterns exist, and make mistakes that reveal hidden dependencies.

With Graphify:

/graphify .
/graphify query "what are the main entry points for the API?"
/graphify query "how does user authentication flow through the system?"
/graphify explain "PaymentService"

In 10 minutes, you have:

  • A visual map of the entire architecture
  • Answers to architectural questions backed by actual code relationships
  • A list of "god nodes" (the most critical components)
  • Suggested questions the graph can answer that you wouldn't think to ask

The GRAPH_REPORT.md might reveal that UserService is called by 14 different modules, making it the most connected component—and a prime candidate for refactoring if it becomes a bottleneck.

Key Benefits

  • Instant codebase comprehension — Query your entire project structure in seconds instead of reading files for hours
  • Works with 20+ AI platforms — Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot CLI, and more
  • 36 language support — TypeScript, Python, Go, Rust, Java, C++, Ruby, and many more via tree-sitter
  • Zero API calls for code — AST extraction happens locally, only semantic analysis uses AI
  • Auto-rebuilds on commit — Git hooks keep your graph current without manual work
  • PR intelligence — Dashboard shows CI state, review status, and merge-order risk
  • Multi-format support — Code, docs, PDFs, images, videos, SQL schemas, Terraform configs
  • Confidence transparency — Every relationship tagged as extracted, inferred, or ambiguous
  • Open source and free — MIT licensed, no usage limits

Frequently Asked Questions

Q: What programming languages does Graphify support?

Graphify supports 36 languages via tree-sitter grammars: Python, TypeScript, JavaScript, Go, Rust, Java, C, C++, C#, Ruby, Kotlin, Scala, PHP, Swift, Lua, Zig, PowerShell, Elixir, Objective-C, Julia, Vue, Svelte, Astro, Groovy, Dart, and more. Code extraction happens locally with zero API calls.

Q: Does Graphify send my code to external APIs?

No. Code files are parsed locally using tree-sitter AST extraction, which requires no API calls. Only non-code files (docs, PDFs, images, videos) and the semantic analysis step use your AI assistant's model API. Your source code never leaves your machine during extraction.

Q: How long does it take to build a graph?

For a typical project with a few hundred files, graph building takes 2-5 minutes depending on the size and the AI model used for semantic analysis. The --cluster-only flag lets you re-run clustering without re-extracting files, which is faster for iterative refinement.

Q: Can I use Graphify with my team, or is it just for individual developers?

Graphify is designed for teams. The graphify-out/ directory is meant to be committed to git, so everyone on the team starts with the same knowledge graph. You can also merge graphs from different sources using graphify merge-graphs a.json b.json.

Q: What's the difference between Graphify and just using my AI assistant's built-in code understanding?

AI assistants read files one at a time and have limited context windows. Graphify builds a structured graph of all relationships across your entire project, which your assistant can query instead of guessing which files to read. The graph captures connections that would require reading dozens of files to discover manually.

Q: Does Graphify work with monorepos?

Yes. Graphify handles monorepos by building a single unified graph across all packages and services. You can scope extraction to specific directories using /graphify ./packages/api or use .graphifyignore to exclude unrelated code.

Q: How do I keep the graph up to date?

Run graphify hook install to set up a git post-commit hook that automatically rebuilds the graph on every commit. For incremental updates, use /graphify . --update to re-extract only changed files.

Q: Is Graphify free?

Yes, Graphify is open source under the MIT license. There are no usage limits, no premium tiers, and no telemetry. The only costs are the AI API calls for semantic analysis, which use your existing API keys.

Conclusion

Graphify bridges the gap between what AI coding assistants can do and what developers actually need. Instead of treating your codebase as a collection of independent files, it builds a knowledge graph that captures the relationships, dependencies, and design decisions that make your project work.

Whether you're onboarding to a new codebase, debugging a complex issue, or trying to understand how a change in one module affects the rest of the system, Graphify gives your AI assistant the context it needs to provide accurate, relevant answers.

The tool is open source, supports virtually every AI coding platform, and takes less than five minutes to set up. If you're using AI coding assistants regularly, Graphify is worth trying—it might change how you interact with your codebase.

ProgrammingTutorialCoddyKit

Enjoyed this article?

Explore more tutorials and insights to level up your coding skills.

Browse All Articles →