$git clone https://github.com/vitali87/code-graph-ragCode-Graph-RAG parses a multi-language codebase with Tree-sitter, builds a knowledge graph of its structure in Memgraph, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema.
| 1 | <div align="center"> |
| 2 | <!-- Bitbucket strips <picture>/<source> tags, so we use a single light-mode <img>. Restore the theme-aware <picture> block below when the GitHub account is reinstated: |
| 3 | <picture> |
| 4 | <source srcset="assets/logo-dark-any.png" media="(prefers-color-scheme: dark)"> |
| 5 | <source srcset="assets/logo-light-any.png" media="(prefers-color-scheme: light)"> |
| 6 | <img src="assets/logo-dark-any.png" alt="Code-Graph-RAG Logo" width="480"> |
| 7 | </picture> |
| 8 | --> |
| 9 | <img src="assets/logo-light-any.png" alt="Code-Graph-RAG Logo" width="480"> |
| 10 | |
| 11 | <p> |
| 12 | <!-- Badges below are commented out while the GitHub account is suspended. Restore them when the account is reinstated. |
| 13 | Stars/Forks: shields.io hits GitHub's API (returns "repo not found" for suspended accounts). |
| 14 | gitcgr: indexes from GitHub (shows "not indexed" while unavailable). |
| 15 | MseeP.ai: badge PNG ignores inline height on Bitbucket and renders as a full-size tile. |
| 16 | <a href="https://github.com/vitali87/code-graph-rag/stargazers"> |
| 17 | <img src="https://img.shields.io/github/stars/vitali87/code-graph-rag?style=social" alt="GitHub stars" /> |
| 18 | </a> |
| 19 | <a href="https://github.com/vitali87/code-graph-rag/network/members"> |
| 20 | <img src="https://img.shields.io/github/forks/vitali87/code-graph-rag?style=social" alt="GitHub forks" /> |
| 21 | </a> |
| 22 | --> |
| 23 | <!-- Codecov, SonarCloud, and OpenSSF Scorecard badges are fed by GitHub-side CI. Uncomment once that CI is confirmed to publish to these services again. |
| 24 | <a href="https://codecov.io/gh/vitali87/code-graph-rag"> |
| 25 | <img src="https://codecov.io/gh/vitali87/code-graph-rag/graph/badge.svg" alt="Codecov" /> |
| 26 | </a> |
| 27 | <a href="https://sonarcloud.io/summary/overall?id=vitali87_code-graph-rag"> |
| 28 | <img src="https://sonarcloud.io/api/project_badges/measure?project=vitali87_code-graph-rag&metric=alert_status" alt="Quality Gate Status" /> |
| 29 | </a> |
| 30 | --> |
| 31 | <!-- |
| 32 | <a href="https://mseep.ai/app/vitali87-code-graph-rag"> |
| 33 | <img src="https://mseep.net/pr/vitali87-code-graph-rag-badge.png" alt="MseeP.ai Security Assessment" height="20" /> |
| 34 | </a> |
| 35 | --> |
| 36 | <a href="https://code-graph-rag.com"> |
| 37 | <img src="https://img.shields.io/badge/Enterprise-Support%20%26%20Services-6366f1" alt="Enterprise Support" /> |
| 38 | </a> |
| 39 | <a href="https://pepy.tech/projects/code-graph-rag"> |
| 40 | <img src="https://static.pepy.tech/personalized-badge/code-graph-rag?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="PyPI Downloads" /> |
| 41 | </a> |
| 42 | <!-- OpenSSF Scorecard only tracks GitHub-hosted repos. Uncomment once the Scorecard workflow is confirmed running on the authoritative GitHub repo. |
| 43 | <a href="https://scorecard.dev/viewer/?uri=github.com/vitali87/code-graph-rag"> |
| 44 | <img src="https://api.scorecard.dev/projects/github.com/vitali87/code-graph-rag/badge" alt="OpenSSF Scorecard" /> |
| 45 | </a> |
| 46 | --> |
| 47 | <!-- |
| 48 | <a href="https://gitcgr.com/vitali87/code-graph-rag"> |
| 49 | <img src="https://gitcgr.com/badge/vitali87/code-graph-rag.svg" alt="gitcgr" /> |
| 50 | </a> |
| 51 | --> |
| 52 | </p> |
| 53 | </div> |
| 54 | |
| 55 | # Code-Graph-RAG |
| 56 | |
| 57 | Code-Graph-RAG parses a multi-language codebase with Tree-sitter, builds a knowledge graph of its structure in Memgraph, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema. |
| 58 | |
| 59 | <p align="center"> |
| 60 | <img src="./assets/demo.gif" alt="demo"> |
| 61 | </p> |
| 62 | |
| 63 | ## Latest News 🔥 |
| 64 | |
| 65 | <!-- SECTION:latest_news --> |
| 66 | - **Ruby Support**: Ruby joins the graph through a new pluggable ast-grep tier that adds a language from a single YAML pattern file, emitting `Module`, `Function`, and `Class` nodes plus import edges without a hand-written parser. |
| 67 | - **Structural Search & Replace**: Find and rewrite code by AST pattern with ast-grep, exposed as agent tools so you can match and transform structure across the whole codebase instead of relying on text or regex. |
| 68 | - **Data-Flow Tracing**: New `FLOWS_TO` taint edges follow values through assignments, function calls, and I/O sinks, wit |