code-graph-rag
Code-Graph-RAG is a Python-based RAG system that parses multi-language codebases using Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language queries and AI-powered code editing. It supports 10+ languages including Python, TypeScript, Java, Rust, and recently added PHP and C.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | vitali87/code-graph-rag |
| Owner | vitali87 |
| Primary language | Python |
| License | MIT — OSI-approved |
| Stars | 2.3k |
| Forks | 383 |
| Open issues | 34 |
| Latest release | v0.0.246 (2026-07-07) |
| Last updated | 2026-07-07 |
| Source | https://github.com/vitali87/code-graph-rag |
What code-graph-rag is
The system combines Tree-sitter AST parsing for language-agnostic code analysis with Memgraph graph storage for codebase structure representation. It integrates LLM backends (Google Gemini, OpenAI, Ollama) to translate natural language to Cypher queries and provides AST-based code editing, dependency analysis, and call graph generation across supported languages.
Get the code-graph-rag source
Clone the repository and explore it locally.
git clone https://github.com/vitali87/code-graph-rag.gitcd code-graph-rag# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Docker & Docker Compose for Memgraph and Qdrant services; cmake and ripgrep system dependencies must be pre-installed on all deployment machines.
- Python 3.12+ required; installation via PyPI (uv tool install or pipx) recommended; treesitter-full and semantic extras needed for multi-language and vector search support.
- LLM backend selection (Gemini, OpenAI, Ollama) must be configured at runtime; each choice has different API key, cost, and latency implications.
- Knowledge graph indexing speed is not documented; large monorepos (>100k files) may have unknown performance characteristics.
- File editing operates via AST-based surgical replacement; extensive testing on target codebase recommended before automation in CI/CD.
When to avoid it — and what to weigh
- Requirement for static security scanning or SAST — Tool focuses on code structure and RAG; does not provide vulnerability scanning, CVE detection, or compliance auditing capabilities.
- Need for production-grade uptime guarantees — Project is actively developed (v0.0.246) with frequent updates; stability and backward compatibility guarantees are not documented.
- Strict offline-only or air-gapped environments — Cloud model integrations (Google Gemini, OpenAI) are primary; Ollama local fallback exists but requires explicit setup.
- Enterprise support and SLA requirements — Enterprise support is mentioned on website but terms, SLA, response times, and commercial licensing details are not provided in repository data.
License & commercial use
MIT License. Permits unrestricted commercial use, modification, and redistribution with attribution and no warranty.
MIT is a permissive OSI license allowing commercial deployment without licensing fees or usage restrictions. Enterprise support and services are advertised on code-graph-rag.com but terms, pricing, and support scope are not specified in repository data; requires direct inquiry.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | Medium |
LLM API keys must be managed securely (environment variables, secrets vaults); no encryption for stored graphs or logs is documented. Memgraph and Qdrant require network isolation in shared environments. Code-Graph-RAG parses and stores code structure in graph—ensure access controls match code repository permissions. Input validation for natural language queries and file editing operations is not described; AST-based surgery reduces injection risk but testing is advised.
Alternatives to consider
LangChain / LlamaIndex with custom retrievers
More flexible, language-agnostic; requires more manual integration; no built-in graph database or multi-language parsing.
GitHub Copilot for Business / Codeium
Cloud-first, real-time IDE integration, vendor-managed; less control over indexing, cannot self-host, higher per-seat cost.
Tabnine Enterprise with custom connectors
Specialized for code completion; weaker on structural analysis and monorepo navigation; proprietary model.
Build on code-graph-rag with DEV.co software developers
Start with Code-Graph-RAG: install via PyPI, spin up Memgraph in Docker, and query your repo in minutes. For enterprise support, visit code-graph-rag.com.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
code-graph-rag FAQ
Does Code-Graph-RAG require internet connectivity?
What is the scalability limit for codebase size?
Can I use Code-Graph-RAG in a CI/CD pipeline?
How does it handle private code repositories?
Software developers & web developers for hire
From first prototype to production, DEV.co delivers software development services around tools like code-graph-rag. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across rag frameworks and beyond.
Ready to streamline codebase intelligence?
Start with Code-Graph-RAG: install via PyPI, spin up Memgraph in Docker, and query your repo in minutes. For enterprise support, visit code-graph-rag.com.