Code-Graph-RAG
A tool that parses a multi-language codebase with Tree-sitter, builds a knowledge graph of its structure in Memgraph, and lets a developer query, edit and optimize the code in plain English.
Code-Graph-RAG reads every source file in a repository, extracts functions, classes, methods and modules and the relationships between them, and stores the result as an interconnected graph spanning a monorepo of mixed languages under one schema.
It answers natural-language questions grounded in a codebase's real structure, retrieves the source of any function, class or method by name or intent, edits code with AST-based patching and a diff preview, finds dead code by walking call and reference edges from entry points, and searches or rewrites code structurally with ast-grep. Where available, compiler-grade frontends such as libclang, go/types, Roslyn, javac and Jedi add exact facts on top of the Tree-sitter parse, and a cgr trace command merges runtime call data from a test run or production eBPF profiles into the graph.
It is written in Python and licensed under MIT.