by Jakedismo
100% Rust implementation of code graphRAG with blazing fast AST+FastML parsing, surrealDB backend and advanced agentic code analysis tools through MCP for efficient code agent context management
# Add to your Claude Code skills
git clone https://github.com/Jakedismo/codegraph-rust
Your codebase, understood.
CodeGraph transforms your entire codebase into a semantically searchable knowledge graph that AI agents can actually reason about—not just grep through.
Ready to get started? Jump to the Installation Guide for step-by-step setup instructions.
Already set up? See the Usage Guide for tips on getting the most out of CodeGraph with your AI assistant.
AI coding assistants are powerful, but they're flying blind. They see files one at a time, grep for patterns, and burn tokens trying to understand your architecture. Every conversation starts from zero.
What if your AI assistant already knew your codebase?
Most semantic search tools create embeddings and call it a day. CodeGraph builds a real knowledge graph:
Your Code → Build Context → AST + FastML → LSP Resolution → Enrichment → Graph + Embeddings
↓ ↓ ↓ ↓ ↓ ↓
Packages Nodes/edges Type-aware API surface Graph Semantic
Features Fast patterns linking Module graph traversal search
Targets Spans Definitions Dataflow/Docs (hybrid)
When you search, you don't just get "similar code"—you get code with its relationships intact. The function that matches your query, plus what calls it, what it depends on, and where it fits in the architecture.
Indexing enrichment adds:
defines, uses, flows_to, returns, mutates) for impact analysisREADME.md, docs/**/*.md, and schema/**/*.surqlIndexing is tiered so you can choose between speed/storage and graph richness. The default is fast.
| Tier | What it enables | Typical use |
|------|-----------------|-------------|
| fast | AST nodes + core edges only (no LSP or enrichment) | Quick indexing, low storage |
| balanced | LSP symbols + docs/enrichment + module linking | Good agentic results without full cost |
| full | All analyzers + LSP definitions + dataflow + architecture | Maximum accuracy/richness |
Tier behavior details:
fast: disables build context, LSP, enrichment, module linking, dataflow, docs/contracts, and architecture; filters out Uses/References edges.balanced: enables build context, LSP symbols, enrichment, module linking, and docs/contracts; filters out References edges.full: enables all analyzers and LSP definitions; no edge filtering.Configure the tier: