code-graph-rag 0.0.246__tar.gz → 0.0.421__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_graph_rag-0.0.246/code_graph_rag.egg-info → code_graph_rag-0.0.421}/PKG-INFO +35 -4
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/PYPI_README.md +23 -2
- code_graph_rag-0.0.421/README.md +189 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421/code_graph_rag.egg-info}/PKG-INFO +35 -4
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/SOURCES.txt +74 -1
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/requires.txt +13 -1
- code_graph_rag-0.0.421/codebase_rag/analyzers/__init__.py +4 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_analyzer.py +201 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/javascript.yaml +28 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/python.yaml +49 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/tsx.yaml +28 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/typescript.yaml +28 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/javascript.yaml +35 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/python.yaml +71 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/tsx.yaml +35 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/typescript.yaml +35 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/javascript.yaml +22 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/python.yaml +33 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/tsx.yaml +22 -0
- code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/typescript.yaml +22 -0
- code_graph_rag-0.0.421/codebase_rag/capture.py +137 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/cli.py +219 -46
- code_graph_rag-0.0.421/codebase_rag/cli_help.py +238 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/config.py +63 -15
- code_graph_rag-0.0.421/codebase_rag/constants/__init__.py +30 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_cpp.py +255 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_csharp.py +317 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_dart.py +142 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_go.py +83 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_java.py +240 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_js.py +291 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_lua.py +31 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_nodes.py +283 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_php.py +36 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_python.py +139 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_rust.py +182 -0
- code_graph_rag-0.0.421/codebase_rag/constants/ast_scala.py +18 -0
- code_graph_rag-0.0.421/codebase_rag/constants/build.py +70 -0
- code_graph_rag-0.0.421/codebase_rag/constants/cli.py +410 -0
- code_graph_rag-0.0.421/codebase_rag/constants/core.py +177 -0
- code_graph_rag-0.0.421/codebase_rag/constants/deadcode_roots.py +217 -0
- code_graph_rag-0.0.421/codebase_rag/constants/deps.py +79 -0
- code_graph_rag-0.0.421/codebase_rag/constants/fqn_specs.py +642 -0
- code_graph_rag-0.0.421/codebase_rag/constants/graph.py +443 -0
- code_graph_rag-0.0.421/codebase_rag/constants/health.py +62 -0
- code_graph_rag-0.0.421/codebase_rag/constants/lang_tooling.py +166 -0
- code_graph_rag-0.0.421/codebase_rag/constants/languages.py +361 -0
- code_graph_rag-0.0.421/codebase_rag/constants/mcp.py +111 -0
- code_graph_rag-0.0.421/codebase_rag/constants/providers.py +135 -0
- code_graph_rag-0.0.421/codebase_rag/constants/security.py +177 -0
- code_graph_rag-0.0.421/codebase_rag/constants/stdlib_types.py +398 -0
- code_graph_rag-0.0.421/codebase_rag/constants/structural.py +69 -0
- code_graph_rag-0.0.421/codebase_rag/cypher_queries.py +254 -0
- code_graph_rag-0.0.421/codebase_rag/dead_code.py +460 -0
- code_graph_rag-0.0.421/codebase_rag/embedder.py +329 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/exceptions.py +28 -9
- code_graph_rag-0.0.421/codebase_rag/graph_audit.py +281 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/graph_updater.py +676 -109
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/language_spec.py +140 -10
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/logs.py +144 -61
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/main.py +48 -4
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/server.py +73 -4
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/tools.py +93 -3
- code_graph_rag-0.0.421/codebase_rag/parser_fingerprint.py +71 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parser_loader.py +197 -39
- code_graph_rag-0.0.421/codebase_rag/parsers/ast_grep_patterns/ruby.yaml +21 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/ast_grep_tier.py +275 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/call_processor.py +4739 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/call_resolver.py +682 -304
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/cpp_modules.py +23 -7
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/identity.py +3 -3
- code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/method_override.py +301 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/mixin.py +1410 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/parent_extraction.py +209 -28
- code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/relationships.py +186 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/utils.py +27 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/cpp/preproc_recovery.py +262 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp/type_inference.py +123 -81
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp/utils.py +150 -22
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp_frontend/__init__.py +2 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/cpp_frontend/constants.py +44 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/cpp_frontend/frontend.py +830 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp_frontend/qn.py +25 -20
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp/__init__.py +1 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp/type_inference.py +1364 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp/utils.py +273 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/__init__.py +23 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/frontend.py +391 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.cs +583 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.csproj +36 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/roslyn/Program.cs +22 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/dart/__init__.py +23 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/dart/type_inference.py +263 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/dart/utils.py +272 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/definition_processor.py +425 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/dependency_parser.py +45 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/export_detection.py +342 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/factory.py +21 -1
- code_graph_rag-0.0.421/codebase_rag/parsers/flow_access/__init__.py +9 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/flow_access/constants.py +17 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/flow_access/processor.py +2061 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/function_ingest.py +1880 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/go/__init__.py +2 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/go/module_paths.py +12 -12
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/go/type_inference.py +31 -25
- code_graph_rag-0.0.421/codebase_rag/parsers/go/utils.py +93 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/import_processor.py +540 -175
- code_graph_rag-0.0.421/codebase_rag/parsers/io_access/__init__.py +72 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/io_access/constants.py +72 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/io_access/descriptor.py +392 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/io_access/extract.py +427 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/io_access/models.py +67 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/io_access/processor.py +1664 -0
- code_graph_rag-0.0.421/codebase_rag/parsers/io_access/registry.py +974 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/method_resolver.py +307 -51
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/type_inference.py +14 -9
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/type_resolver.py +30 -12
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/utils.py +63 -10
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/variable_analyzer.py +17 -17
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/ingest.py +211 -50
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/module_system.py +61 -39
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/type_inference.py +4 -4
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/utils.py +2 -1
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/__init__.py +2 -1
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/ast_analyzer.py +136 -30
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/expression_analyzer.py +90 -17
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/type_inference.py +10 -5
- code_graph_rag-0.0.421/codebase_rag/parsers/py/utils.py +96 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/variable_analyzer.py +24 -24
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/python_source_roots.py +25 -25
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/rs/type_inference.py +90 -74
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/rs/utils.py +24 -9
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/stdlib_extractor.py +29 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/structure_processor.py +7 -3
- code_graph_rag-0.0.421/codebase_rag/parsers/type_inference.py +634 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/utils.py +395 -107
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/prompts.py +16 -4
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/providers/base.py +44 -7
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/providers/litellm.py +1 -2
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/readme_sections.py +29 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/__init__.py +5 -0
- code_graph_rag-0.0.421/codebase_rag/services/filtering.py +50 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/graph_service.py +35 -11
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/protobuf_service.py +1 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/cli.py +11 -6
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tool_errors.py +9 -9
- code_graph_rag-0.0.421/codebase_rag/tools/ast_grep_service.py +218 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/health_checker.py +59 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/language.py +18 -5
- code_graph_rag-0.0.421/codebase_rag/tools/structural_editor.py +58 -0
- code_graph_rag-0.0.421/codebase_rag/tools/structural_search.py +46 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/tool_descriptions.py +48 -2
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/types_defs.py +320 -28
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/unixcoder.py +17 -12
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/dependencies.py +28 -1
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/path_utils.py +29 -16
- code_graph_rag-0.0.421/codebase_rag/vector_store.py +496 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/cli.py +20 -7
- code_graph_rag-0.0.421/codec/schema_pb2.py +77 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/pyproject.toml +38 -3
- code_graph_rag-0.0.246/README.md +0 -1001
- code_graph_rag-0.0.246/codebase_rag/cli_help.py +0 -239
- code_graph_rag-0.0.246/codebase_rag/constants.py +0 -3696
- code_graph_rag-0.0.246/codebase_rag/cypher_queries.py +0 -333
- code_graph_rag-0.0.246/codebase_rag/embedder.py +0 -193
- code_graph_rag-0.0.246/codebase_rag/parsers/call_processor.py +0 -3165
- code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/method_override.py +0 -79
- code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/mixin.py +0 -679
- code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/relationships.py +0 -114
- code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/utils.py +0 -13
- code_graph_rag-0.0.246/codebase_rag/parsers/cpp_frontend/constants.py +0 -39
- code_graph_rag-0.0.246/codebase_rag/parsers/cpp_frontend/frontend.py +0 -381
- code_graph_rag-0.0.246/codebase_rag/parsers/definition_processor.py +0 -290
- code_graph_rag-0.0.246/codebase_rag/parsers/export_detection.py +0 -160
- code_graph_rag-0.0.246/codebase_rag/parsers/function_ingest.py +0 -809
- code_graph_rag-0.0.246/codebase_rag/parsers/go/utils.py +0 -63
- code_graph_rag-0.0.246/codebase_rag/parsers/py/utils.py +0 -38
- code_graph_rag-0.0.246/codebase_rag/parsers/type_inference.py +0 -410
- code_graph_rag-0.0.246/codebase_rag/vector_store.py +0 -180
- code_graph_rag-0.0.246/codec/schema_pb2.py +0 -75
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/LICENSE +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/cgr/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/dependency_links.txt +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/entry_points.txt +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/top_level.txt +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/cgr_state.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/decorators.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/docker-compose.yaml +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/graph_loader.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/client.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/models.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/node_type.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/base.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/cpp.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/java.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/js_ts.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/lua.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/php.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/protocol.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/python.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/registry.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/rust.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/lua/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/lua/type_inference.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/lua/utils.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/rs/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/providers/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/schema_builder.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/schemas.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/anthropic_token_counter.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/llm.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/constants.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/health.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/manager.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/code_retrieval.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/codebase_query.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/directory_lister.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/file_editor.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/file_reader.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/file_writer.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/semantic_search.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/shell_command.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/fqn_resolver.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/rich_markdown.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/source_extraction.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/token_utils.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/constants.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/models.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/storage.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codec/__init__.py +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codec/schema_pb2.pyi +0 -0
- {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-graph-rag
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.421
|
|
4
4
|
Summary: The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: rag,retrieval-augmented-generation,knowledge-graph,code-analysis,tree-sitter,mcp,mcp-server,llm,graph-database,semantic-search,codebase,memgraph,developer-tools,monorepo
|
|
@@ -19,7 +19,7 @@ Requires-Python: >=3.12
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: loguru>=0.7.3
|
|
22
|
-
Requires-Dist: mcp>=1.
|
|
22
|
+
Requires-Dist: mcp>=1.28.1
|
|
23
23
|
Requires-Dist: pydantic-ai>=1.102.0
|
|
24
24
|
Requires-Dist: pydantic-settings>=2.12.0
|
|
25
25
|
Requires-Dist: pymgclient>=1.5.1
|
|
@@ -46,6 +46,9 @@ Requires-Dist: pytest-cov>=4.0.0; extra == "test"
|
|
|
46
46
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
47
47
|
Requires-Dist: testcontainers>=4.9.0; extra == "test"
|
|
48
48
|
Requires-Dist: libclang>=18.1.1; extra == "test"
|
|
49
|
+
Requires-Dist: filelock>=3.12; extra == "test"
|
|
50
|
+
Requires-Dist: ast-grep-py>=0.44.0; extra == "test"
|
|
51
|
+
Requires-Dist: pyyaml>=6.0; extra == "test"
|
|
49
52
|
Provides-Extra: treesitter-full
|
|
50
53
|
Requires-Dist: tree-sitter-python>=0.23.6; extra == "treesitter-full"
|
|
51
54
|
Requires-Dist: tree-sitter-javascript>=0.23.1; extra == "treesitter-full"
|
|
@@ -58,15 +61,22 @@ Requires-Dist: tree-sitter-c>=0.24.1; extra == "treesitter-full"
|
|
|
58
61
|
Requires-Dist: tree-sitter-cpp>=0.23.0; extra == "treesitter-full"
|
|
59
62
|
Requires-Dist: tree-sitter-lua>=0.0.19; extra == "treesitter-full"
|
|
60
63
|
Requires-Dist: tree-sitter-php>=0.24.1; extra == "treesitter-full"
|
|
64
|
+
Requires-Dist: tree-sitter-c-sharp>=0.23.5; extra == "treesitter-full"
|
|
65
|
+
Requires-Dist: tree-sitter-dart>=0.1.0; extra == "treesitter-full"
|
|
61
66
|
Provides-Extra: semantic
|
|
62
67
|
Requires-Dist: qdrant-client>=1.9.0; extra == "semantic"
|
|
63
68
|
Requires-Dist: torch>=2.6.0; extra == "semantic"
|
|
64
69
|
Requires-Dist: transformers>=4.0.0; extra == "semantic"
|
|
70
|
+
Provides-Extra: milvus
|
|
71
|
+
Requires-Dist: pymilvus[milvus-lite]>=3.0.0; extra == "milvus"
|
|
72
|
+
Provides-Extra: ast-grep
|
|
73
|
+
Requires-Dist: ast-grep-py>=0.44.0; extra == "ast-grep"
|
|
74
|
+
Requires-Dist: pyyaml>=6.0; extra == "ast-grep"
|
|
65
75
|
Dynamic: license-file
|
|
66
76
|
|
|
67
77
|
# Code-Graph-RAG
|
|
68
78
|
|
|
69
|
-
A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and
|
|
79
|
+
A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimisation.
|
|
70
80
|
|
|
71
81
|
## Install
|
|
72
82
|
|
|
@@ -86,6 +96,16 @@ With semantic code search (UniXcoder embeddings):
|
|
|
86
96
|
pip install 'code-graph-rag[semantic]'
|
|
87
97
|
```
|
|
88
98
|
|
|
99
|
+
Qdrant is the default vector store for semantic search. To use Milvus Lite,
|
|
100
|
+
install `code-graph-rag[semantic,milvus]`, then set
|
|
101
|
+
`CGR_VECTOR_STORE_BACKEND=milvus` and `MILVUS_URI=./.milvus_code_embeddings.db`
|
|
102
|
+
before indexing.
|
|
103
|
+
|
|
104
|
+
To compute embeddings on an OpenAI-compatible endpoint (OpenAI, Ollama, vLLM)
|
|
105
|
+
instead of locally, set `CGR_EMBEDDING_PROVIDER=openai` with
|
|
106
|
+
`OPENAI_EMBEDDING_BASE_URL` and `OPENAI_EMBEDDING_MODEL`; torch and
|
|
107
|
+
transformers are then not required locally.
|
|
108
|
+
|
|
89
109
|
### Prerequisites
|
|
90
110
|
|
|
91
111
|
- Python 3.12+
|
|
@@ -117,12 +137,23 @@ cgr index -o ./index-output --repo-path ./my-project
|
|
|
117
137
|
cgr export -o graph.json
|
|
118
138
|
```
|
|
119
139
|
|
|
120
|
-
**AI-guided
|
|
140
|
+
**AI-guided optimisation:**
|
|
121
141
|
|
|
122
142
|
```bash
|
|
123
143
|
cgr optimize python --repo-path ./my-project
|
|
124
144
|
```
|
|
125
145
|
|
|
146
|
+
**Find dead code (functions unreachable from any entry point):**
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cgr dead-code # scan the indexed project
|
|
150
|
+
cgr dead-code -e main --exclude '*.gen.*' # add roots, skip generated code
|
|
151
|
+
cgr dead-code --format json --fail-on-found # CI-friendly report
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Results are candidates for review, not a guaranteed delete list. See the
|
|
155
|
+
[Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
|
|
156
|
+
|
|
126
157
|
**Run as an MCP server (for Claude Code):**
|
|
127
158
|
|
|
128
159
|
```bash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Code-Graph-RAG
|
|
2
2
|
|
|
3
|
-
A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and
|
|
3
|
+
A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimisation.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -20,6 +20,16 @@ With semantic code search (UniXcoder embeddings):
|
|
|
20
20
|
pip install 'code-graph-rag[semantic]'
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
Qdrant is the default vector store for semantic search. To use Milvus Lite,
|
|
24
|
+
install `code-graph-rag[semantic,milvus]`, then set
|
|
25
|
+
`CGR_VECTOR_STORE_BACKEND=milvus` and `MILVUS_URI=./.milvus_code_embeddings.db`
|
|
26
|
+
before indexing.
|
|
27
|
+
|
|
28
|
+
To compute embeddings on an OpenAI-compatible endpoint (OpenAI, Ollama, vLLM)
|
|
29
|
+
instead of locally, set `CGR_EMBEDDING_PROVIDER=openai` with
|
|
30
|
+
`OPENAI_EMBEDDING_BASE_URL` and `OPENAI_EMBEDDING_MODEL`; torch and
|
|
31
|
+
transformers are then not required locally.
|
|
32
|
+
|
|
23
33
|
### Prerequisites
|
|
24
34
|
|
|
25
35
|
- Python 3.12+
|
|
@@ -51,12 +61,23 @@ cgr index -o ./index-output --repo-path ./my-project
|
|
|
51
61
|
cgr export -o graph.json
|
|
52
62
|
```
|
|
53
63
|
|
|
54
|
-
**AI-guided
|
|
64
|
+
**AI-guided optimisation:**
|
|
55
65
|
|
|
56
66
|
```bash
|
|
57
67
|
cgr optimize python --repo-path ./my-project
|
|
58
68
|
```
|
|
59
69
|
|
|
70
|
+
**Find dead code (functions unreachable from any entry point):**
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cgr dead-code # scan the indexed project
|
|
74
|
+
cgr dead-code -e main --exclude '*.gen.*' # add roots, skip generated code
|
|
75
|
+
cgr dead-code --format json --fail-on-found # CI-friendly report
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Results are candidates for review, not a guaranteed delete list. See the
|
|
79
|
+
[Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
|
|
80
|
+
|
|
60
81
|
**Run as an MCP server (for Claude Code):**
|
|
61
82
|
|
|
62
83
|
```bash
|
|
@@ -0,0 +1,189 @@
|
|
|
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, with coverage across C#, Java, C, and Go.
|
|
69
|
+
<!-- /SECTION:latest_news -->
|
|
70
|
+
|
|
71
|
+
See [NEWS.md](NEWS.md) for the full history.
|
|
72
|
+
|
|
73
|
+
## What It Does
|
|
74
|
+
|
|
75
|
+
Point Code-Graph-RAG at a repository and it reads every source file, extracts functions, classes, methods, modules, and the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:
|
|
76
|
+
|
|
77
|
+
- Ask questions about the codebase in natural language and get answers grounded in the real structure.
|
|
78
|
+
- Retrieve the actual source of any function, class, or method by name or by intent.
|
|
79
|
+
- Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
|
|
80
|
+
- Optimise code against language best practices or your own coding standards.
|
|
81
|
+
- Find dead code by walking call and reference edges from entry points.
|
|
82
|
+
- Search and rewrite structurally by AST pattern with ast-grep.
|
|
83
|
+
|
|
84
|
+
## How It Works
|
|
85
|
+
|
|
86
|
+
The system has two components:
|
|
87
|
+
|
|
88
|
+
1. **Multi-language parser.** A Tree-sitter based parser reads the codebase and ingests functions, classes, methods, modules, and their relationships into Memgraph under a single language-agnostic schema.
|
|
89
|
+
2. **RAG system** (`codebase_rag/`). An interactive CLI that turns natural language into Cypher queries, retrieves matching code, and drives AI-powered editing and optimisation.
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Source Code -> Tree-sitter Parser -> AST Analysis -> Memgraph Knowledge Graph
|
|
93
|
+
|
|
|
94
|
+
User Query -> AI Model (Cypher Gen) -> Cypher Query -> Graph Results -> Response
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
See the [Architecture Overview](docs/architecture/overview.md) and [Graph Schema](docs/architecture/graph-schema.md) for the full picture.
|
|
98
|
+
|
|
99
|
+
## Supported Languages
|
|
100
|
+
|
|
101
|
+
Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart are fully supported. Scala is in development. See the [Language Support](docs/architecture/language-support.md) matrix for per-language capabilities.
|
|
102
|
+
|
|
103
|
+
## Installation
|
|
104
|
+
|
|
105
|
+
`cgr` is published to PyPI. Install it system-wide with the `treesitter-full` (all languages) and `semantic` (vector search) extras:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# with uv (recommended)
|
|
109
|
+
uv tool install "code-graph-rag[treesitter-full,semantic]"
|
|
110
|
+
|
|
111
|
+
# or with pipx
|
|
112
|
+
pipx install "code-graph-rag[treesitter-full,semantic]"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
You also need Docker (for Memgraph), `cmake`, and `ripgrep`. Full prerequisites, source installs, and environment setup are in the [Installation](docs/getting-started/installation.md) guide.
|
|
116
|
+
|
|
117
|
+
## Quick Start
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Start the packaged Memgraph + Qdrant stack (no compose file needed)
|
|
121
|
+
cgr daemon up
|
|
122
|
+
|
|
123
|
+
# Parse a repository into the graph, then query it
|
|
124
|
+
cgr start --repo-path /path/to/repo --update-graph --clean
|
|
125
|
+
cgr start --repo-path /path/to/repo
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The [Quick Start](docs/getting-started/quickstart.md) guide walks through parsing, querying, and exporting in five minutes.
|
|
129
|
+
|
|
130
|
+
## MCP Server
|
|
131
|
+
|
|
132
|
+
Code-Graph-RAG runs as an [MCP](https://modelcontextprotocol.io) server so Claude Code and other MCP clients can query and edit your codebase directly. See the [MCP Server](docs/guide/mcp-server.md) guide for setup.
|
|
133
|
+
|
|
134
|
+
## Documentation
|
|
135
|
+
|
|
136
|
+
**Getting Started**
|
|
137
|
+
- [Installation](docs/getting-started/installation.md)
|
|
138
|
+
- [Quick Start](docs/getting-started/quickstart.md)
|
|
139
|
+
- [Configuration](docs/getting-started/configuration.md)
|
|
140
|
+
|
|
141
|
+
**User Guide**
|
|
142
|
+
- [CLI Reference](docs/guide/cli-reference.md)
|
|
143
|
+
- [Interactive Querying](docs/guide/interactive-querying.md)
|
|
144
|
+
- [Code Optimisation](docs/guide/code-optimization.md)
|
|
145
|
+
- [Dead Code Detection](docs/guide/dead-code.md)
|
|
146
|
+
- [Graph Export](docs/guide/graph-export.md)
|
|
147
|
+
- [Real-Time Updates](docs/guide/realtime-updates.md)
|
|
148
|
+
- [MCP Server](docs/guide/mcp-server.md)
|
|
149
|
+
|
|
150
|
+
**Architecture**
|
|
151
|
+
- [Overview](docs/architecture/overview.md)
|
|
152
|
+
- [Graph Schema](docs/architecture/graph-schema.md)
|
|
153
|
+
- [Language Support](docs/architecture/language-support.md)
|
|
154
|
+
- [Data-Flow Edges](docs/architecture/data-flow-edges.md)
|
|
155
|
+
|
|
156
|
+
**Python SDK**
|
|
157
|
+
- [Overview](docs/sdk/overview.md)
|
|
158
|
+
- [Graph Loader](docs/sdk/graph-loader.md)
|
|
159
|
+
- [Cypher Generator](docs/sdk/cypher-generator.md)
|
|
160
|
+
- [Semantic Search](docs/sdk/semantic-search.md)
|
|
161
|
+
|
|
162
|
+
**Advanced**
|
|
163
|
+
- [Adding Languages](docs/advanced/adding-languages.md)
|
|
164
|
+
- [Ignore Patterns](docs/advanced/ignore-patterns.md)
|
|
165
|
+
- [Building Binaries](docs/advanced/building-binaries.md)
|
|
166
|
+
- [Troubleshooting](docs/advanced/troubleshooting.md)
|
|
167
|
+
|
|
168
|
+
## Enterprise Services
|
|
169
|
+
|
|
170
|
+
Code-Graph-RAG is open source and free to use. For organisations that need more, we offer **fully managed cloud-hosted solutions** and **on-premise deployments**:
|
|
171
|
+
|
|
172
|
+
- **Cloud-Hosted Deployment**: Managed cloud infrastructure for both the graph database and the AI agent connection. Zero infrastructure overhead, so we handle scaling, updates, and availability while your team focuses on building.
|
|
173
|
+
- **On-Premise & Air-Gapped Deployment**: Deploy Code-Graph-RAG entirely within your own environment, including air-gapped networks. Full data sovereignty for regulated industries and security-sensitive organisations.
|
|
174
|
+
|
|
175
|
+
We also offer custom development, integration consulting, technical support contracts, and team training.
|
|
176
|
+
|
|
177
|
+
**[View plans & pricing at code-graph-rag.com](https://code-graph-rag.com/enterprise)**
|
|
178
|
+
|
|
179
|
+
## Contributing
|
|
180
|
+
|
|
181
|
+
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines. Good first PRs come from the TODO issues.
|
|
182
|
+
|
|
183
|
+
## Support
|
|
184
|
+
|
|
185
|
+
For issues or questions, check the [Troubleshooting](docs/advanced/troubleshooting.md) guide first, then open an issue.
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-graph-rag
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.421
|
|
4
4
|
Summary: The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: rag,retrieval-augmented-generation,knowledge-graph,code-analysis,tree-sitter,mcp,mcp-server,llm,graph-database,semantic-search,codebase,memgraph,developer-tools,monorepo
|
|
@@ -19,7 +19,7 @@ Requires-Python: >=3.12
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: loguru>=0.7.3
|
|
22
|
-
Requires-Dist: mcp>=1.
|
|
22
|
+
Requires-Dist: mcp>=1.28.1
|
|
23
23
|
Requires-Dist: pydantic-ai>=1.102.0
|
|
24
24
|
Requires-Dist: pydantic-settings>=2.12.0
|
|
25
25
|
Requires-Dist: pymgclient>=1.5.1
|
|
@@ -46,6 +46,9 @@ Requires-Dist: pytest-cov>=4.0.0; extra == "test"
|
|
|
46
46
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
47
47
|
Requires-Dist: testcontainers>=4.9.0; extra == "test"
|
|
48
48
|
Requires-Dist: libclang>=18.1.1; extra == "test"
|
|
49
|
+
Requires-Dist: filelock>=3.12; extra == "test"
|
|
50
|
+
Requires-Dist: ast-grep-py>=0.44.0; extra == "test"
|
|
51
|
+
Requires-Dist: pyyaml>=6.0; extra == "test"
|
|
49
52
|
Provides-Extra: treesitter-full
|
|
50
53
|
Requires-Dist: tree-sitter-python>=0.23.6; extra == "treesitter-full"
|
|
51
54
|
Requires-Dist: tree-sitter-javascript>=0.23.1; extra == "treesitter-full"
|
|
@@ -58,15 +61,22 @@ Requires-Dist: tree-sitter-c>=0.24.1; extra == "treesitter-full"
|
|
|
58
61
|
Requires-Dist: tree-sitter-cpp>=0.23.0; extra == "treesitter-full"
|
|
59
62
|
Requires-Dist: tree-sitter-lua>=0.0.19; extra == "treesitter-full"
|
|
60
63
|
Requires-Dist: tree-sitter-php>=0.24.1; extra == "treesitter-full"
|
|
64
|
+
Requires-Dist: tree-sitter-c-sharp>=0.23.5; extra == "treesitter-full"
|
|
65
|
+
Requires-Dist: tree-sitter-dart>=0.1.0; extra == "treesitter-full"
|
|
61
66
|
Provides-Extra: semantic
|
|
62
67
|
Requires-Dist: qdrant-client>=1.9.0; extra == "semantic"
|
|
63
68
|
Requires-Dist: torch>=2.6.0; extra == "semantic"
|
|
64
69
|
Requires-Dist: transformers>=4.0.0; extra == "semantic"
|
|
70
|
+
Provides-Extra: milvus
|
|
71
|
+
Requires-Dist: pymilvus[milvus-lite]>=3.0.0; extra == "milvus"
|
|
72
|
+
Provides-Extra: ast-grep
|
|
73
|
+
Requires-Dist: ast-grep-py>=0.44.0; extra == "ast-grep"
|
|
74
|
+
Requires-Dist: pyyaml>=6.0; extra == "ast-grep"
|
|
65
75
|
Dynamic: license-file
|
|
66
76
|
|
|
67
77
|
# Code-Graph-RAG
|
|
68
78
|
|
|
69
|
-
A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and
|
|
79
|
+
A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimisation.
|
|
70
80
|
|
|
71
81
|
## Install
|
|
72
82
|
|
|
@@ -86,6 +96,16 @@ With semantic code search (UniXcoder embeddings):
|
|
|
86
96
|
pip install 'code-graph-rag[semantic]'
|
|
87
97
|
```
|
|
88
98
|
|
|
99
|
+
Qdrant is the default vector store for semantic search. To use Milvus Lite,
|
|
100
|
+
install `code-graph-rag[semantic,milvus]`, then set
|
|
101
|
+
`CGR_VECTOR_STORE_BACKEND=milvus` and `MILVUS_URI=./.milvus_code_embeddings.db`
|
|
102
|
+
before indexing.
|
|
103
|
+
|
|
104
|
+
To compute embeddings on an OpenAI-compatible endpoint (OpenAI, Ollama, vLLM)
|
|
105
|
+
instead of locally, set `CGR_EMBEDDING_PROVIDER=openai` with
|
|
106
|
+
`OPENAI_EMBEDDING_BASE_URL` and `OPENAI_EMBEDDING_MODEL`; torch and
|
|
107
|
+
transformers are then not required locally.
|
|
108
|
+
|
|
89
109
|
### Prerequisites
|
|
90
110
|
|
|
91
111
|
- Python 3.12+
|
|
@@ -117,12 +137,23 @@ cgr index -o ./index-output --repo-path ./my-project
|
|
|
117
137
|
cgr export -o graph.json
|
|
118
138
|
```
|
|
119
139
|
|
|
120
|
-
**AI-guided
|
|
140
|
+
**AI-guided optimisation:**
|
|
121
141
|
|
|
122
142
|
```bash
|
|
123
143
|
cgr optimize python --repo-path ./my-project
|
|
124
144
|
```
|
|
125
145
|
|
|
146
|
+
**Find dead code (functions unreachable from any entry point):**
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cgr dead-code # scan the indexed project
|
|
150
|
+
cgr dead-code -e main --exclude '*.gen.*' # add roots, skip generated code
|
|
151
|
+
cgr dead-code --format json --fail-on-found # CI-friendly report
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Results are candidates for review, not a guaranteed delete list. See the
|
|
155
|
+
[Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
|
|
156
|
+
|
|
126
157
|
**Run as an MCP server (for Claude Code):**
|
|
127
158
|
|
|
128
159
|
```bash
|
|
@@ -10,22 +10,25 @@ code_graph_rag.egg-info/entry_points.txt
|
|
|
10
10
|
code_graph_rag.egg-info/requires.txt
|
|
11
11
|
code_graph_rag.egg-info/top_level.txt
|
|
12
12
|
codebase_rag/__init__.py
|
|
13
|
+
codebase_rag/capture.py
|
|
13
14
|
codebase_rag/cgr_state.py
|
|
14
15
|
codebase_rag/cli.py
|
|
15
16
|
codebase_rag/cli_help.py
|
|
16
17
|
codebase_rag/config.py
|
|
17
|
-
codebase_rag/constants.py
|
|
18
18
|
codebase_rag/cypher_queries.py
|
|
19
|
+
codebase_rag/dead_code.py
|
|
19
20
|
codebase_rag/decorators.py
|
|
20
21
|
codebase_rag/docker-compose.yaml
|
|
21
22
|
codebase_rag/embedder.py
|
|
22
23
|
codebase_rag/exceptions.py
|
|
24
|
+
codebase_rag/graph_audit.py
|
|
23
25
|
codebase_rag/graph_loader.py
|
|
24
26
|
codebase_rag/graph_updater.py
|
|
25
27
|
codebase_rag/language_spec.py
|
|
26
28
|
codebase_rag/logs.py
|
|
27
29
|
codebase_rag/main.py
|
|
28
30
|
codebase_rag/models.py
|
|
31
|
+
codebase_rag/parser_fingerprint.py
|
|
29
32
|
codebase_rag/parser_loader.py
|
|
30
33
|
codebase_rag/prompts.py
|
|
31
34
|
codebase_rag/readme_sections.py
|
|
@@ -35,11 +38,54 @@ codebase_rag/tool_errors.py
|
|
|
35
38
|
codebase_rag/types_defs.py
|
|
36
39
|
codebase_rag/unixcoder.py
|
|
37
40
|
codebase_rag/vector_store.py
|
|
41
|
+
codebase_rag/analyzers/__init__.py
|
|
42
|
+
codebase_rag/analyzers/ast_grep_analyzer.py
|
|
43
|
+
codebase_rag/analyzers/ast_grep_rules/patterns/javascript.yaml
|
|
44
|
+
codebase_rag/analyzers/ast_grep_rules/patterns/python.yaml
|
|
45
|
+
codebase_rag/analyzers/ast_grep_rules/patterns/tsx.yaml
|
|
46
|
+
codebase_rag/analyzers/ast_grep_rules/patterns/typescript.yaml
|
|
47
|
+
codebase_rag/analyzers/ast_grep_rules/security/javascript.yaml
|
|
48
|
+
codebase_rag/analyzers/ast_grep_rules/security/python.yaml
|
|
49
|
+
codebase_rag/analyzers/ast_grep_rules/security/tsx.yaml
|
|
50
|
+
codebase_rag/analyzers/ast_grep_rules/security/typescript.yaml
|
|
51
|
+
codebase_rag/analyzers/ast_grep_rules/smells/javascript.yaml
|
|
52
|
+
codebase_rag/analyzers/ast_grep_rules/smells/python.yaml
|
|
53
|
+
codebase_rag/analyzers/ast_grep_rules/smells/tsx.yaml
|
|
54
|
+
codebase_rag/analyzers/ast_grep_rules/smells/typescript.yaml
|
|
55
|
+
codebase_rag/constants/__init__.py
|
|
56
|
+
codebase_rag/constants/ast_cpp.py
|
|
57
|
+
codebase_rag/constants/ast_csharp.py
|
|
58
|
+
codebase_rag/constants/ast_dart.py
|
|
59
|
+
codebase_rag/constants/ast_go.py
|
|
60
|
+
codebase_rag/constants/ast_java.py
|
|
61
|
+
codebase_rag/constants/ast_js.py
|
|
62
|
+
codebase_rag/constants/ast_lua.py
|
|
63
|
+
codebase_rag/constants/ast_nodes.py
|
|
64
|
+
codebase_rag/constants/ast_php.py
|
|
65
|
+
codebase_rag/constants/ast_python.py
|
|
66
|
+
codebase_rag/constants/ast_rust.py
|
|
67
|
+
codebase_rag/constants/ast_scala.py
|
|
68
|
+
codebase_rag/constants/build.py
|
|
69
|
+
codebase_rag/constants/cli.py
|
|
70
|
+
codebase_rag/constants/core.py
|
|
71
|
+
codebase_rag/constants/deadcode_roots.py
|
|
72
|
+
codebase_rag/constants/deps.py
|
|
73
|
+
codebase_rag/constants/fqn_specs.py
|
|
74
|
+
codebase_rag/constants/graph.py
|
|
75
|
+
codebase_rag/constants/health.py
|
|
76
|
+
codebase_rag/constants/lang_tooling.py
|
|
77
|
+
codebase_rag/constants/languages.py
|
|
78
|
+
codebase_rag/constants/mcp.py
|
|
79
|
+
codebase_rag/constants/providers.py
|
|
80
|
+
codebase_rag/constants/security.py
|
|
81
|
+
codebase_rag/constants/stdlib_types.py
|
|
82
|
+
codebase_rag/constants/structural.py
|
|
38
83
|
codebase_rag/mcp/__init__.py
|
|
39
84
|
codebase_rag/mcp/client.py
|
|
40
85
|
codebase_rag/mcp/server.py
|
|
41
86
|
codebase_rag/mcp/tools.py
|
|
42
87
|
codebase_rag/parsers/__init__.py
|
|
88
|
+
codebase_rag/parsers/ast_grep_tier.py
|
|
43
89
|
codebase_rag/parsers/call_processor.py
|
|
44
90
|
codebase_rag/parsers/call_resolver.py
|
|
45
91
|
codebase_rag/parsers/definition_processor.py
|
|
@@ -53,6 +99,7 @@ codebase_rag/parsers/stdlib_extractor.py
|
|
|
53
99
|
codebase_rag/parsers/structure_processor.py
|
|
54
100
|
codebase_rag/parsers/type_inference.py
|
|
55
101
|
codebase_rag/parsers/utils.py
|
|
102
|
+
codebase_rag/parsers/ast_grep_patterns/ruby.yaml
|
|
56
103
|
codebase_rag/parsers/class_ingest/__init__.py
|
|
57
104
|
codebase_rag/parsers/class_ingest/cpp_modules.py
|
|
58
105
|
codebase_rag/parsers/class_ingest/identity.py
|
|
@@ -63,12 +110,27 @@ codebase_rag/parsers/class_ingest/parent_extraction.py
|
|
|
63
110
|
codebase_rag/parsers/class_ingest/relationships.py
|
|
64
111
|
codebase_rag/parsers/class_ingest/utils.py
|
|
65
112
|
codebase_rag/parsers/cpp/__init__.py
|
|
113
|
+
codebase_rag/parsers/cpp/preproc_recovery.py
|
|
66
114
|
codebase_rag/parsers/cpp/type_inference.py
|
|
67
115
|
codebase_rag/parsers/cpp/utils.py
|
|
68
116
|
codebase_rag/parsers/cpp_frontend/__init__.py
|
|
69
117
|
codebase_rag/parsers/cpp_frontend/constants.py
|
|
70
118
|
codebase_rag/parsers/cpp_frontend/frontend.py
|
|
71
119
|
codebase_rag/parsers/cpp_frontend/qn.py
|
|
120
|
+
codebase_rag/parsers/csharp/__init__.py
|
|
121
|
+
codebase_rag/parsers/csharp/type_inference.py
|
|
122
|
+
codebase_rag/parsers/csharp/utils.py
|
|
123
|
+
codebase_rag/parsers/csharp_frontend/__init__.py
|
|
124
|
+
codebase_rag/parsers/csharp_frontend/frontend.py
|
|
125
|
+
codebase_rag/parsers/csharp_frontend/roslyn/Frontend.cs
|
|
126
|
+
codebase_rag/parsers/csharp_frontend/roslyn/Frontend.csproj
|
|
127
|
+
codebase_rag/parsers/csharp_frontend/roslyn/Program.cs
|
|
128
|
+
codebase_rag/parsers/dart/__init__.py
|
|
129
|
+
codebase_rag/parsers/dart/type_inference.py
|
|
130
|
+
codebase_rag/parsers/dart/utils.py
|
|
131
|
+
codebase_rag/parsers/flow_access/__init__.py
|
|
132
|
+
codebase_rag/parsers/flow_access/constants.py
|
|
133
|
+
codebase_rag/parsers/flow_access/processor.py
|
|
72
134
|
codebase_rag/parsers/go/__init__.py
|
|
73
135
|
codebase_rag/parsers/go/module_paths.py
|
|
74
136
|
codebase_rag/parsers/go/type_inference.py
|
|
@@ -84,6 +146,13 @@ codebase_rag/parsers/handlers/protocol.py
|
|
|
84
146
|
codebase_rag/parsers/handlers/python.py
|
|
85
147
|
codebase_rag/parsers/handlers/registry.py
|
|
86
148
|
codebase_rag/parsers/handlers/rust.py
|
|
149
|
+
codebase_rag/parsers/io_access/__init__.py
|
|
150
|
+
codebase_rag/parsers/io_access/constants.py
|
|
151
|
+
codebase_rag/parsers/io_access/descriptor.py
|
|
152
|
+
codebase_rag/parsers/io_access/extract.py
|
|
153
|
+
codebase_rag/parsers/io_access/models.py
|
|
154
|
+
codebase_rag/parsers/io_access/processor.py
|
|
155
|
+
codebase_rag/parsers/io_access/registry.py
|
|
87
156
|
codebase_rag/parsers/java/__init__.py
|
|
88
157
|
codebase_rag/parsers/java/method_resolver.py
|
|
89
158
|
codebase_rag/parsers/java/type_inference.py
|
|
@@ -112,6 +181,7 @@ codebase_rag/providers/base.py
|
|
|
112
181
|
codebase_rag/providers/litellm.py
|
|
113
182
|
codebase_rag/services/__init__.py
|
|
114
183
|
codebase_rag/services/anthropic_token_counter.py
|
|
184
|
+
codebase_rag/services/filtering.py
|
|
115
185
|
codebase_rag/services/graph_service.py
|
|
116
186
|
codebase_rag/services/llm.py
|
|
117
187
|
codebase_rag/services/protobuf_service.py
|
|
@@ -121,6 +191,7 @@ codebase_rag/stack/constants.py
|
|
|
121
191
|
codebase_rag/stack/health.py
|
|
122
192
|
codebase_rag/stack/manager.py
|
|
123
193
|
codebase_rag/tools/__init__.py
|
|
194
|
+
codebase_rag/tools/ast_grep_service.py
|
|
124
195
|
codebase_rag/tools/code_retrieval.py
|
|
125
196
|
codebase_rag/tools/codebase_query.py
|
|
126
197
|
codebase_rag/tools/directory_lister.py
|
|
@@ -131,6 +202,8 @@ codebase_rag/tools/health_checker.py
|
|
|
131
202
|
codebase_rag/tools/language.py
|
|
132
203
|
codebase_rag/tools/semantic_search.py
|
|
133
204
|
codebase_rag/tools/shell_command.py
|
|
205
|
+
codebase_rag/tools/structural_editor.py
|
|
206
|
+
codebase_rag/tools/structural_search.py
|
|
134
207
|
codebase_rag/tools/tool_descriptions.py
|
|
135
208
|
codebase_rag/utils/__init__.py
|
|
136
209
|
codebase_rag/utils/dependencies.py
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
loguru>=0.7.3
|
|
2
|
-
mcp>=1.
|
|
2
|
+
mcp>=1.28.1
|
|
3
3
|
pydantic-ai>=1.102.0
|
|
4
4
|
pydantic-settings>=2.12.0
|
|
5
5
|
pymgclient>=1.5.1
|
|
@@ -20,6 +20,13 @@ huggingface-hub[hf-xet]>=1.7.2
|
|
|
20
20
|
griffe<2,>=1.0
|
|
21
21
|
pathspec>=1.0.4
|
|
22
22
|
|
|
23
|
+
[ast-grep]
|
|
24
|
+
ast-grep-py>=0.44.0
|
|
25
|
+
pyyaml>=6.0
|
|
26
|
+
|
|
27
|
+
[milvus]
|
|
28
|
+
pymilvus[milvus-lite]>=3.0.0
|
|
29
|
+
|
|
23
30
|
[semantic]
|
|
24
31
|
qdrant-client>=1.9.0
|
|
25
32
|
torch>=2.6.0
|
|
@@ -32,6 +39,9 @@ pytest-cov>=4.0.0
|
|
|
32
39
|
pytest-xdist>=3.8.0
|
|
33
40
|
testcontainers>=4.9.0
|
|
34
41
|
libclang>=18.1.1
|
|
42
|
+
filelock>=3.12
|
|
43
|
+
ast-grep-py>=0.44.0
|
|
44
|
+
pyyaml>=6.0
|
|
35
45
|
|
|
36
46
|
[treesitter-full]
|
|
37
47
|
tree-sitter-python>=0.23.6
|
|
@@ -45,3 +55,5 @@ tree-sitter-c>=0.24.1
|
|
|
45
55
|
tree-sitter-cpp>=0.23.0
|
|
46
56
|
tree-sitter-lua>=0.0.19
|
|
47
57
|
tree-sitter-php>=0.24.1
|
|
58
|
+
tree-sitter-c-sharp>=0.23.5
|
|
59
|
+
tree-sitter-dart>=0.1.0
|