Code Graph Rag
Code Graph Rag is an open-source tool that enables users to query, understand, and edit multi-language codebases with the power of AI and knowledge graphs. It uses a Tree-sitter based parser to read the codebase and ingests functions, classes, methods, modules, and their relationships into a graph under a single language-agnostic schema. The system has two components: a multi-language parser and a RAG system that turns natural language into Cypher queries, retrieves matching code, and drives AI-powered editing and optimisation. The graph is stored in an embedded SQLite file by default, but Memgraph and Neo4j are also available as opt-in backends. Code Graph Rag supports a wide range of languages, including Python, TypeScript, JavaScript, Rust, Go, Java, C, C++, and many others. It provides features such as code optimisation, dead code detection, dynamic call tracing, and graph export. The tool is designed to be used by developers, ML engineers, and data scientists who need to work with large and complex codebases. Code Graph Rag is available on GitHub and can be installed using pip or uv. It is licensed under the MIT license and has a strong focus on community involvement and contribution.
- Category
- Dev Tools
- Pricing
- Open Source
Problem solved
Code Graph Rag solves the problem of navigating and understanding large and complex codebases, which can be time-consuming and difficult for developers. It provides a unified graph schema that allows users to query and edit code in plain English, making it easier to work with multi-language codebases. By using AI and knowledge graphs, Code Graph Rag enables users to optimise code, detect dead code, and trace dynamic calls, making it a powerful tool for developers and ML engineers.
Use cases
- Querying and editing multi-language codebases
- Code optimisation and dead code detection
- Dynamic call tracing and graph export
- Working with large and complex codebases
- Using AI and knowledge graphs to improve code understanding
Audience
- Developers
- ML Engineers
- Data Scientists
Pros
- Unified graph schema for multi-language codebases
- AI-powered editing and optimisation
- Support for a wide range of languages
- Open-source and community-driven
Cons
- Steep learning curve due to complex features
- Requires significant computational resources
- Limited support for certain languages
Official website: https://github.com/vitali87/code-graph-rag
Canonical LambdaBase page: https://www.lambdabase.com/tools/code-graph-rag