DEV.co
RAG Frameworks · vitali87

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.

Source: GitHub — github.com/vitali87/code-graph-rag
2.3k
GitHub stars
383
Forks
Python
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryvitali87/code-graph-rag
Ownervitali87
Primary languagePython
LicenseMIT — OSI-approved
Stars2.3k
Forks383
Open issues34
Latest releasev0.0.246 (2026-07-07)
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the code-graph-rag source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/vitali87/code-graph-rag.gitcd code-graph-rag# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Multi-language monorepo navigation

Query complex codebases spanning Python, TypeScript, Java, and other languages with unified syntax; extract dependency chains and call relationships across language boundaries.

AI-assisted code refactoring and optimization

Leverage AST-based surgical edits with visual diffs; apply language-specific optimization suggestions guided by your own architectural standards and coding conventions.

Codebase understanding for new team members

Generate interactive knowledge graphs and answer structural questions in plain English—function locations, class hierarchies, module dependencies—without manual documentation.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceMedium
Security considerations

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.

Software development agency

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.co

Related 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?
Cloud models (Gemini, OpenAI) require internet. Local mode via Ollama allows offline operation after initial setup. Memgraph and Qdrant run locally in Docker.
What is the scalability limit for codebase size?
Not documented. Performance benchmarks for 100k+, 1M+ lines of code or files are unavailable; testing on target codebase is recommended.
Can I use Code-Graph-RAG in a CI/CD pipeline?
Possible: CLI interface and shell command execution support automation; however, stability guarantees and rollback strategies are not specified.
How does it handle private code repositories?
Code is processed locally; code structure is stored in Memgraph and Qdrant on your infrastructure. Ensure proper access controls and network isolation.

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.