-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
CodeGraph turns any folder of code into a persistent, queryable knowledge graph, then lets you (or an AI assistant) query that compact graph instead of re-reading the whole codebase. It extracts symbols and relationships across 30+ languages with tree-sitter, clusters them into communities, surfaces the structurally important pieces, and writes machine-readable graphs, human-readable reports, and interactive visualizations.
It is a single static Rust binary (codegraph) with no runtime, plus an MCP server so a
coding assistant can consult the graph before grepping or reading files.
codegraph extract . # build codegraph-out/ for the current directory
codegraph query "authentication flow" # get a relevant subgraph back
codegraph explain parse_config # show a node and its neighbours
codegraph affected parse_config # what would changing it break?
codegraph serve # expose the graph to an assistant over MCPSee Quickstart for a fuller walk-through and Installation to get the binary.
- A canonical
graph.jsonyou can query without reading source. - A Markdown report of god nodes, surprising connections, import cycles, and suggested questions (Analysis and Reports).
- 2D, 3D, and SVG visualizations plus GraphML / Cypher / DOT / Obsidian / wiki exports (Output Formats, Visualizations).
- Graph queries: relevant-subgraph search, shortest path, and reverse impact (Querying).
- An MCP server and one-command assistant integration (MCP Server, Assistant Integration).
- Multi-repo federation with real cross-repo edge resolution (Workspaces and Federation).
Getting started: Installation - Quickstart
Concepts: Architecture - Languages
Using CodeGraph: Commands - Extraction - Querying
Integrations: MCP Server - Assistant Integration
Scaling: Workspaces and Federation - Incremental Updates - PR Dashboard
Reference: Configuration - Development
-
Offline by default. A code-only corpus makes no network calls. Only the opt-in
--semanticpass over documents calls an LLM (Semantic Analysis). -
Auditable. Every edge carries a confidence level (
EXTRACTED,INFERRED,AMBIGUOUS). - Deterministic. The same input produces the same graph; ids and community numbers are stable across rebuilds.
Getting started
Concepts
Using CodeGraph
- Commands
- Extraction
- Querying
- Cross-Language Edges
- Analysis and Reports
- Output Formats
- Visualizations
Integrations
Scaling
Reference