Repolode
vitali87

vitali87/code-graph-rag

Indexes multi-language codebases into a knowledge graph so you can query, search, and edit code in plain English via an AI agent or MCP server.

Estrellas
5,267
Forks
702
Issues abiertos
589
Último commit
hace 1 hora

¿Qué es?

Code-Graph-RAG parses a repository with Tree-sitter, extracting functions, classes, methods, modules, and the relationships between them into a graph. The graph is stored in an embedded SQLite file by default, so no database server is needed; Memgraph and Neo4j are available as opt-in backends.

Once indexed, you can ask questions in natural language, which the tool turns into Cypher queries against the graph, and retrieve the actual source of any function or class. The agent can also make AST-based edits with a diff preview, optimise code, find dead code from entry points, and search or rewrite code by AST pattern with ast-grep.

The project also runs as an MCP server so Claude Code and other MCP clients can query and edit the codebase directly. Python 3.12+ and ripgrep are required for installation, and the package is published on PyPI.

Funciones clave

  • 01Parses multiple languages, including Python, TypeScript, Rust, Go, Java, C/C++ and C#, into one graph schema.
  • 02Answers natural-language questions by generating Cypher queries against the code graph.
  • 03Retrieves source code for functions, classes, and methods by name or intent.
  • 04Applies AST-based code edits with a diff preview before changes are written.
  • 05Detects dead code by walking call and reference edges from entry points.
  • 06Runs as an MCP server for Claude Code and other MCP clients.

Casos de uso

  • Onboarding onto a large monorepo and asking how modules and functions connect.
  • Letting an AI coding assistant in Claude Code work with grounded structural context.
  • Auditing a mixed-language codebase for unused functions before cleanup.
  • Running AST-pattern searches and rewrites across several languages.

Temas

Preguntas frecuentes

¿Qué es code-graph-rag?
Indexes multi-language codebases into a knowledge graph so you can query, search, and edit code in plain English via an AI agent or MCP server. Code-Graph-RAG parses a repository with Tree-sitter, extracting functions, classes, methods, modules, and the relationships between them into a graph. The graph is stored in an embedded SQLite file by default, so no database server is needed; Memgraph and Neo4j are available as opt-in backends.
¿code-graph-rag es gratuito? ¿Qué licencia tiene?
code-graph-rag es open source bajo la licencia MIT. Revisa los términos de la licencia antes de usarlo en productos comerciales.
¿code-graph-rag sigue mantenido?
Mantenimiento activo. El último commit de code-graph-rag fue el 19 oct 2026.
¿Para qué puedo usar code-graph-rag?
Onboarding onto a large monorepo and asking how modules and functions connect. Letting an AI coding assistant in Claude Code work with grounded structural context. Auditing a mixed-language codebase for unused functions before cleanup. Running AST-pattern searches and rewrites across several languages.
¿Dónde consigo code-graph-rag?
El código fuente y las instrucciones de instalación están en GitHub: https://github.com/vitali87/code-graph-rag

Resumen generado por IA a partir del README del proyecto. Las estadísticas de GitHub se actualizan a diario.

Proyectos relacionados