code-graph-rag 0.0.148__tar.gz → 0.0.209__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.
Files changed (163) hide show
  1. {code_graph_rag-0.0.148/code_graph_rag.egg-info → code_graph_rag-0.0.209}/PKG-INFO +19 -14
  2. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/PYPI_README.md +1 -1
  3. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/README.md +129 -34
  4. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209/code_graph_rag.egg-info}/PKG-INFO +19 -14
  5. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/code_graph_rag.egg-info/SOURCES.txt +27 -1
  6. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/code_graph_rag.egg-info/requires.txt +16 -12
  7. code_graph_rag-0.0.209/codebase_rag/cgr_state.py +57 -0
  8. code_graph_rag-0.0.209/codebase_rag/cli.py +1164 -0
  9. code_graph_rag-0.0.209/codebase_rag/cli_help.py +234 -0
  10. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/config.py +41 -6
  11. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/constants.py +601 -79
  12. code_graph_rag-0.0.209/codebase_rag/cypher_queries.py +274 -0
  13. code_graph_rag-0.0.209/codebase_rag/docker-compose.yaml +27 -0
  14. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/embedder.py +11 -1
  15. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/exceptions.py +17 -1
  16. code_graph_rag-0.0.209/codebase_rag/graph_updater.py +1440 -0
  17. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/language_spec.py +62 -19
  18. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/logs.py +77 -17
  19. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/main.py +686 -88
  20. code_graph_rag-0.0.209/codebase_rag/mcp/client.py +65 -0
  21. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/mcp/server.py +25 -14
  22. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/mcp/tools.py +158 -3
  23. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/models.py +16 -1
  24. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parser_loader.py +26 -0
  25. code_graph_rag-0.0.209/codebase_rag/parsers/call_processor.py +2388 -0
  26. code_graph_rag-0.0.209/codebase_rag/parsers/call_resolver.py +1355 -0
  27. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/cpp_modules.py +17 -20
  28. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/identity.py +27 -16
  29. code_graph_rag-0.0.209/codebase_rag/parsers/class_ingest/mixin.py +618 -0
  30. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/node_type.py +20 -0
  31. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/parent_extraction.py +102 -11
  32. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/relationships.py +24 -4
  33. code_graph_rag-0.0.209/codebase_rag/parsers/cpp/__init__.py +5 -0
  34. code_graph_rag-0.0.209/codebase_rag/parsers/cpp/type_inference.py +272 -0
  35. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/cpp/utils.py +28 -20
  36. code_graph_rag-0.0.209/codebase_rag/parsers/cpp_frontend/__init__.py +14 -0
  37. code_graph_rag-0.0.209/codebase_rag/parsers/cpp_frontend/constants.py +39 -0
  38. code_graph_rag-0.0.209/codebase_rag/parsers/cpp_frontend/frontend.py +381 -0
  39. code_graph_rag-0.0.209/codebase_rag/parsers/cpp_frontend/qn.py +171 -0
  40. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/definition_processor.py +115 -24
  41. code_graph_rag-0.0.209/codebase_rag/parsers/export_detection.py +160 -0
  42. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/factory.py +7 -0
  43. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/function_ingest.py +330 -59
  44. code_graph_rag-0.0.209/codebase_rag/parsers/go/__init__.py +13 -0
  45. code_graph_rag-0.0.209/codebase_rag/parsers/go/type_inference.py +101 -0
  46. code_graph_rag-0.0.209/codebase_rag/parsers/go/utils.py +63 -0
  47. code_graph_rag-0.0.209/codebase_rag/parsers/handlers/php.py +62 -0
  48. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/registry.py +2 -0
  49. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/rust.py +5 -6
  50. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/import_processor.py +323 -10
  51. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/java/method_resolver.py +108 -6
  52. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/java/type_inference.py +18 -12
  53. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/java/type_resolver.py +26 -1
  54. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/java/utils.py +26 -5
  55. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/java/variable_analyzer.py +110 -37
  56. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/js_ts/ingest.py +24 -10
  57. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/js_ts/module_system.py +9 -8
  58. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/js_ts/type_inference.py +84 -14
  59. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/js_ts/utils.py +38 -8
  60. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/py/ast_analyzer.py +82 -32
  61. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/py/expression_analyzer.py +31 -6
  62. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/py/type_inference.py +15 -0
  63. code_graph_rag-0.0.209/codebase_rag/parsers/py/variable_analyzer.py +573 -0
  64. code_graph_rag-0.0.209/codebase_rag/parsers/python_source_roots.py +150 -0
  65. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/rs/utils.py +17 -6
  66. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/stdlib_extractor.py +73 -170
  67. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/structure_processor.py +16 -13
  68. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/type_inference.py +80 -1
  69. code_graph_rag-0.0.209/codebase_rag/parsers/utils.py +706 -0
  70. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/prompts.py +80 -7
  71. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/providers/base.py +43 -2
  72. code_graph_rag-0.0.209/codebase_rag/providers/litellm.py +50 -0
  73. code_graph_rag-0.0.209/codebase_rag/services/anthropic_token_counter.py +154 -0
  74. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/services/graph_service.py +28 -2
  75. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/services/llm.py +53 -17
  76. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/services/protobuf_service.py +43 -27
  77. code_graph_rag-0.0.209/codebase_rag/stack/__init__.py +21 -0
  78. code_graph_rag-0.0.209/codebase_rag/stack/cli.py +83 -0
  79. code_graph_rag-0.0.209/codebase_rag/stack/constants.py +51 -0
  80. code_graph_rag-0.0.209/codebase_rag/stack/health.py +60 -0
  81. code_graph_rag-0.0.209/codebase_rag/stack/manager.py +262 -0
  82. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tool_errors.py +3 -20
  83. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/codebase_query.py +16 -1
  84. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/health_checker.py +1 -1
  85. code_graph_rag-0.0.209/codebase_rag/tools/semantic_search.py +162 -0
  86. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/shell_command.py +23 -7
  87. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/tool_descriptions.py +28 -9
  88. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/types_defs.py +60 -4
  89. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/unixcoder.py +2 -3
  90. code_graph_rag-0.0.209/codebase_rag/utils/path_utils.py +125 -0
  91. code_graph_rag-0.0.209/codebase_rag/utils/rich_markdown.py +30 -0
  92. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/vector_store.py +12 -1
  93. code_graph_rag-0.0.209/codebase_rag/workspaces/__init__.py +28 -0
  94. code_graph_rag-0.0.209/codebase_rag/workspaces/cli.py +102 -0
  95. code_graph_rag-0.0.209/codebase_rag/workspaces/constants.py +24 -0
  96. code_graph_rag-0.0.209/codebase_rag/workspaces/models.py +29 -0
  97. code_graph_rag-0.0.209/codebase_rag/workspaces/storage.py +125 -0
  98. code_graph_rag-0.0.209/codec/schema_pb2.py +75 -0
  99. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codec/schema_pb2.pyi +82 -98
  100. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/pyproject.toml +27 -13
  101. code_graph_rag-0.0.148/codebase_rag/cli.py +0 -588
  102. code_graph_rag-0.0.148/codebase_rag/cli_help.py +0 -108
  103. code_graph_rag-0.0.148/codebase_rag/cypher_queries.py +0 -162
  104. code_graph_rag-0.0.148/codebase_rag/graph_updater.py +0 -644
  105. code_graph_rag-0.0.148/codebase_rag/parsers/call_processor.py +0 -366
  106. code_graph_rag-0.0.148/codebase_rag/parsers/call_resolver.py +0 -700
  107. code_graph_rag-0.0.148/codebase_rag/parsers/class_ingest/mixin.py +0 -321
  108. code_graph_rag-0.0.148/codebase_rag/parsers/py/variable_analyzer.py +0 -301
  109. code_graph_rag-0.0.148/codebase_rag/parsers/utils.py +0 -179
  110. code_graph_rag-0.0.148/codebase_rag/tools/document_analyzer.py +0 -171
  111. code_graph_rag-0.0.148/codebase_rag/tools/semantic_search.py +0 -164
  112. code_graph_rag-0.0.148/codebase_rag/utils/path_utils.py +0 -27
  113. code_graph_rag-0.0.148/codec/__init__.py +0 -0
  114. code_graph_rag-0.0.148/codec/schema_pb2.py +0 -61
  115. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/LICENSE +0 -0
  116. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/cgr/__init__.py +0 -0
  117. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/code_graph_rag.egg-info/dependency_links.txt +0 -0
  118. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/code_graph_rag.egg-info/entry_points.txt +0 -0
  119. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/code_graph_rag.egg-info/top_level.txt +0 -0
  120. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/__init__.py +0 -0
  121. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/decorators.py +0 -0
  122. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/graph_loader.py +0 -0
  123. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/mcp/__init__.py +0 -0
  124. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/__init__.py +0 -0
  125. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/__init__.py +0 -0
  126. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/method_override.py +0 -0
  127. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/class_ingest/utils.py +0 -0
  128. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/dependency_parser.py +0 -0
  129. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/__init__.py +0 -0
  130. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/base.py +0 -0
  131. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/cpp.py +0 -0
  132. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/java.py +0 -0
  133. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/js_ts.py +0 -0
  134. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/lua.py +0 -0
  135. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/protocol.py +0 -0
  136. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/handlers/python.py +0 -0
  137. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/java/__init__.py +0 -0
  138. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/js_ts/__init__.py +0 -0
  139. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/lua/__init__.py +0 -0
  140. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/lua/type_inference.py +0 -0
  141. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/lua/utils.py +0 -0
  142. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/py/__init__.py +0 -0
  143. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/parsers/py/utils.py +0 -0
  144. {code_graph_rag-0.0.148/codebase_rag/parsers/cpp → code_graph_rag-0.0.209/codebase_rag/parsers/rs}/__init__.py +0 -0
  145. {code_graph_rag-0.0.148/codebase_rag/parsers/rs → code_graph_rag-0.0.209/codebase_rag/providers}/__init__.py +0 -0
  146. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/readme_sections.py +0 -0
  147. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/schema_builder.py +0 -0
  148. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/schemas.py +0 -0
  149. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/services/__init__.py +0 -0
  150. {code_graph_rag-0.0.148/codebase_rag/providers → code_graph_rag-0.0.209/codebase_rag/tools}/__init__.py +0 -0
  151. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/code_retrieval.py +0 -0
  152. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/directory_lister.py +0 -0
  153. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/file_editor.py +0 -0
  154. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/file_reader.py +0 -0
  155. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/file_writer.py +0 -0
  156. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/tools/language.py +0 -0
  157. {code_graph_rag-0.0.148/codebase_rag/tools → code_graph_rag-0.0.209/codebase_rag/utils}/__init__.py +0 -0
  158. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/utils/dependencies.py +0 -0
  159. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/utils/fqn_resolver.py +0 -0
  160. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/utils/source_extraction.py +0 -0
  161. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/codebase_rag/utils/token_utils.py +0 -0
  162. {code_graph_rag-0.0.148/codebase_rag/utils → code_graph_rag-0.0.209/codec}/__init__.py +0 -0
  163. {code_graph_rag-0.0.148 → code_graph_rag-0.0.209}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-graph-rag
3
- Version: 0.0.148
3
+ Version: 0.0.209
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
@@ -14,34 +14,38 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
14
  Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
17
18
  Requires-Python: >=3.12
18
19
  Description-Content-Type: text/markdown
19
20
  License-File: LICENSE
20
21
  Requires-Dist: loguru>=0.7.3
21
- Requires-Dist: mcp>=1.21.1
22
- Requires-Dist: pydantic-ai>=1.70.0
23
- Requires-Dist: pydantic-settings>=2.0.0
24
- Requires-Dist: pymgclient>=1.4.0
25
- Requires-Dist: python-dotenv>=1.1.0
22
+ Requires-Dist: mcp>=1.25.0
23
+ Requires-Dist: pydantic-ai>=1.102.0
24
+ Requires-Dist: pydantic-settings>=2.12.0
25
+ Requires-Dist: pymgclient>=1.5.1
26
+ Requires-Dist: python-dotenv>=1.2.1
26
27
  Requires-Dist: tiktoken>=0.12.0
27
28
  Requires-Dist: toml>=0.10.2
28
- Requires-Dist: tree-sitter-python>=0.23.6
29
+ Requires-Dist: tree-sitter-python>=0.25.0
29
30
  Requires-Dist: tree-sitter==0.25.2
30
31
  Requires-Dist: watchdog>=6.0.0
31
- Requires-Dist: typer>=0.12.5
32
- Requires-Dist: rich>=13.7.1
33
- Requires-Dist: prompt-toolkit>=3.0.0
32
+ Requires-Dist: typer>=0.21.1
33
+ Requires-Dist: rich>=14.2.0
34
+ Requires-Dist: prompt-toolkit>=3.0.52
34
35
  Requires-Dist: diff-match-patch>=20241021
35
- Requires-Dist: click>=8.0.0
36
- Requires-Dist: protobuf>=5.27.0
36
+ Requires-Dist: click>=8.3.1
37
+ Requires-Dist: protobuf>=6.33.5
37
38
  Requires-Dist: defusedxml>=0.7.1
38
- Requires-Dist: huggingface-hub[hf-xet]>=0.36.0
39
+ Requires-Dist: huggingface-hub[hf-xet]>=1.7.2
40
+ Requires-Dist: griffe<2,>=1.0
41
+ Requires-Dist: pathspec>=1.0.4
39
42
  Provides-Extra: test
40
43
  Requires-Dist: pytest>=8.4.1; extra == "test"
41
44
  Requires-Dist: pytest-asyncio>=1.0.0; extra == "test"
42
45
  Requires-Dist: pytest-cov>=4.0.0; extra == "test"
43
46
  Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
44
47
  Requires-Dist: testcontainers>=4.9.0; extra == "test"
48
+ Requires-Dist: libclang>=18.1.1; extra == "test"
45
49
  Provides-Extra: treesitter-full
46
50
  Requires-Dist: tree-sitter-python>=0.23.6; extra == "treesitter-full"
47
51
  Requires-Dist: tree-sitter-javascript>=0.23.1; extra == "treesitter-full"
@@ -53,6 +57,7 @@ Requires-Dist: tree-sitter-java>=0.23.5; extra == "treesitter-full"
53
57
  Requires-Dist: tree-sitter-c>=0.24.1; extra == "treesitter-full"
54
58
  Requires-Dist: tree-sitter-cpp>=0.23.0; extra == "treesitter-full"
55
59
  Requires-Dist: tree-sitter-lua>=0.0.19; extra == "treesitter-full"
60
+ Requires-Dist: tree-sitter-php>=0.24.1; extra == "treesitter-full"
56
61
  Provides-Extra: semantic
57
62
  Requires-Dist: qdrant-client>=1.9.0; extra == "semantic"
58
63
  Requires-Dist: torch>=2.6.0; extra == "semantic"
@@ -95,7 +100,7 @@ The package installs a `cgr` command.
95
100
  **Start Memgraph, parse a repo, and query it:**
96
101
 
97
102
  ```bash
98
- docker compose up -d # start Memgraph
103
+ cgr daemon up # start Memgraph + Qdrant
99
104
  cgr start --repo-path ./my-project \
100
105
  --update-graph --clean # parse & launch interactive chat
101
106
  ```
@@ -34,7 +34,7 @@ The package installs a `cgr` command.
34
34
  **Start Memgraph, parse a repo, and query it:**
35
35
 
36
36
  ```bash
37
- docker compose up -d # start Memgraph
37
+ cgr daemon up # start Memgraph + Qdrant
38
38
  cgr start --repo-path ./my-project \
39
39
  --update-graph --clean # parse & launch interactive chat
40
40
  ```
@@ -1,38 +1,54 @@
1
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:
2
3
  <picture>
3
4
  <source srcset="assets/logo-dark-any.png" media="(prefers-color-scheme: dark)">
4
5
  <source srcset="assets/logo-light-any.png" media="(prefers-color-scheme: light)">
5
6
  <img src="assets/logo-dark-any.png" alt="Code-Graph-RAG Logo" width="480">
6
7
  </picture>
8
+ -->
9
+ <img src="assets/logo-light-any.png" alt="Code-Graph-RAG Logo" width="480">
7
10
 
8
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.
9
16
  <a href="https://github.com/vitali87/code-graph-rag/stargazers">
10
17
  <img src="https://img.shields.io/github/stars/vitali87/code-graph-rag?style=social" alt="GitHub stars" />
11
18
  </a>
12
19
  <a href="https://github.com/vitali87/code-graph-rag/network/members">
13
20
  <img src="https://img.shields.io/github/forks/vitali87/code-graph-rag?style=social" alt="GitHub forks" />
14
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.
15
24
  <a href="https://codecov.io/gh/vitali87/code-graph-rag">
16
25
  <img src="https://codecov.io/gh/vitali87/code-graph-rag/graph/badge.svg" alt="Codecov" />
17
26
  </a>
18
27
  <a href="https://sonarcloud.io/summary/overall?id=vitali87_code-graph-rag">
19
28
  <img src="https://sonarcloud.io/api/project_badges/measure?project=vitali87_code-graph-rag&metric=alert_status" alt="Quality Gate Status" />
20
29
  </a>
30
+ -->
31
+ <!--
21
32
  <a href="https://mseep.ai/app/vitali87-code-graph-rag">
22
33
  <img src="https://mseep.net/pr/vitali87-code-graph-rag-badge.png" alt="MseeP.ai Security Assessment" height="20" />
23
34
  </a>
35
+ -->
24
36
  <a href="https://code-graph-rag.com">
25
37
  <img src="https://img.shields.io/badge/Enterprise-Support%20%26%20Services-6366f1" alt="Enterprise Support" />
26
38
  </a>
27
39
  <a href="https://pepy.tech/projects/code-graph-rag">
28
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" />
29
41
  </a>
42
+ <!-- OpenSSF Scorecard only tracks GitHub-hosted repos. Uncomment once the Scorecard workflow is confirmed running on the authoritative GitHub repo.
30
43
  <a href="https://scorecard.dev/viewer/?uri=github.com/vitali87/code-graph-rag">
31
44
  <img src="https://api.scorecard.dev/projects/github.com/vitali87/code-graph-rag/badge" alt="OpenSSF Scorecard" />
32
45
  </a>
46
+ -->
47
+ <!--
33
48
  <a href="https://gitcgr.com/vitali87/code-graph-rag">
34
49
  <img src="https://gitcgr.com/badge/vitali87/code-graph-rag.svg" alt="gitcgr" />
35
50
  </a>
51
+ -->
36
52
  </p>
37
53
  </div>
38
54
 
@@ -47,9 +63,9 @@ An accurate Retrieval-Augmented Generation (RAG) system that analyzes multi-lang
47
63
 
48
64
  ## Latest News 🔥
49
65
 
66
+ - **PHP Language Support**: Full PHP language support added — classes, interfaces, traits, enums, namespaces, PHP 8 attributes, and call graph analysis. Contributed by [@rs-ipps](https://github.com/rs-ipps).
50
67
  - **C Language Support**: Full C language support added — functions, structs, unions, enums, preprocessor includes, and call graph analysis. Contributed by [@dj0nes](https://github.com/dj0nes).
51
68
  - **Visualise any GitHub repo instantly!** Just change `github.com` to `gitcgr.com` in any repo URL — that's it, only 3 letters! Get an interactive graph of the entire codebase structure. Try it now: [gitcgr.com](https://gitcgr.com)
52
- - **MCP Server Integration**: Code-Graph-RAG now works as an MCP server with Claude Code! Query and edit your codebase using natural language directly from Claude Code. [Setup Guide](docs/claude-code-setup.md)
53
69
 
54
70
  ## 🚀 Features
55
71
 
@@ -63,12 +79,11 @@ An accurate Retrieval-Augmented Generation (RAG) system that analyzes multi-lang
63
79
  | Java | Fully Supported | .java | ✓ | ✓ | ✓ | - | Generics, annotations, modern features (records/sealed classes), concurrency, reflection |
64
80
  | JavaScript | Fully Supported | .js, .jsx | ✓ | ✓ | ✓ | - | ES6 modules, CommonJS, prototype methods, object methods, arrow functions |
65
81
  | Lua | Fully Supported | .lua | ✓ | - | ✓ | - | Local/global functions, metatables, closures, coroutines |
82
+ | PHP | Fully Supported | .php | ✓ | ✓ | ✓ | - | Classes, interfaces, traits, enums, namespaces, PHP 8 attributes |
66
83
  | Python | Fully Supported | .py | ✓ | ✓ | ✓ | ✓ | Type inference, decorators, nested functions |
67
84
  | Rust | Fully Supported | .rs | ✓ | ✓ | ✓ | ✓ | impl blocks, associated functions |
68
85
  | TypeScript | Fully Supported | .ts, .tsx | ✓ | ✓ | ✓ | - | Interfaces, type aliases, enums, namespaces, ES6/CommonJS modules |
69
- | C# | In Development | .cs | ✓ | ✓ | ✓ | - | Classes, interfaces, generics (planned) |
70
86
  | Go | In Development | .go | ✓ | ✓ | ✓ | - | Methods, type declarations |
71
- | PHP | In Development | .php | ✓ | ✓ | ✓ | - | Classes, functions, namespaces |
72
87
  | Scala | In Development | .scala, .sc | ✓ | ✓ | ✓ | - | Case classes, objects |
73
88
  <!-- /SECTION:supported_languages -->
74
89
  - **🌳 Tree-sitter Parsing**: Uses Tree-sitter for robust, language-agnostic AST parsing
@@ -125,9 +140,54 @@ sudo dnf install ripgrep
125
140
 
126
141
  ## 🛠️ Installation
127
142
 
143
+ ### System-wide install (recommended for end users)
144
+
145
+ `cgr` is published to PyPI and can be installed system-wide so it works from any
146
+ target repo without activating a project virtualenv. Install with the
147
+ `treesitter-full` (all languages) and `semantic` (vector search) extras:
148
+
128
149
  ```bash
129
- git clone https://github.com/vitali87/code-graph-rag.git
150
+ # with uv (recommended)
151
+ uv tool install "code-graph-rag[treesitter-full,semantic]"
152
+
153
+ # or with pipx
154
+ pipx install "code-graph-rag[treesitter-full,semantic]"
155
+ ```
156
+
157
+ For a Python-only install, omit the extras. For local development from a clone,
158
+ use `uv tool install --editable "/path/to/code-graph-rag[treesitter-full,semantic]"`.
159
+
160
+ After install, `cgr` is on PATH. From any repository, run:
161
+
162
+ ```bash
163
+ cd ~/path/to/some-target-repo
164
+ cgr daemon up # one-time: start the shared memgraph + qdrant stack
165
+ cgr start # auto-sync the current repo and drop into the agent
166
+ ```
167
+
168
+ `cgr start` defaults `--repo-path` to the current directory and auto-syncs the
169
+ graph incrementally on entry. Pass `--no-sync` to skip the sync, or
170
+ `--no-start-stack` if memgraph/qdrant already run elsewhere.
171
+
172
+ Useful subcommands:
173
+
174
+ | Command | Purpose |
175
+ |---|---|
176
+ | `cgr daemon up/down/status/restart/logs` | Manage the shared docker stack |
177
+ | `cgr stop` | Alias for `cgr daemon down` |
178
+ | `cgr status` | Show stack state + per-project last-sync timestamp |
179
+ | `cgr workspace create/list/show/delete` | Manage named bundles of repos |
180
+ | `cgr workspace add-repo / remove-repo` | Edit a workspace's repo set |
181
+ | `cgr start --workspace mono` | Open the agent over every project in the workspace |
182
+ | `cgr start --projects a,b,c` | Scope agent queries to the listed projects |
183
+
184
+ Indexed data persists across `cgr daemon down` thanks to named memgraph + qdrant
185
+ volumes (`memgraph_data`, `memgraph_log`, `qdrant_storage`).
186
+
187
+ ### Local development install
130
188
 
189
+ ```bash
190
+ git clone https://github.com/vitali87/code-graph-rag.git
131
191
  cd code-graph-rag
132
192
  ```
133
193
 
@@ -232,9 +292,20 @@ ollama pull llama3.2
232
292
 
233
293
  4. **Start Memgraph database**:
234
294
  ```bash
235
- docker-compose up -d
295
+ cgr daemon up
296
+ ```
297
+
298
+ 5. **Verify installation**:
299
+ ```bash
300
+ # If installed from PyPI:
301
+ cgr --help
302
+
303
+ # If running from source:
304
+ uv run cgr --help
236
305
  ```
237
306
 
307
+ > **Note**: When running from source (cloned repo), prefix all `cgr` commands below with `uv run`, e.g., `uv run cgr start ...`
308
+
238
309
  ## 🛠️ Makefile Commands
239
310
 
240
311
  Use the Makefile for common development tasks:
@@ -260,6 +331,7 @@ Use the Makefile for common development tasks:
260
331
  | `make format` | Run ruff format |
261
332
  | `make typecheck` | Run type checking with ty |
262
333
  | `make check` | Run all checks: lint, typecheck, test |
334
+ | `make release` | Build, verify, and publish the current pyproject version to PyPI, then tag and create a GitHub Release |
263
335
  | `make pre-commit` | Run all pre-commit checks locally (comprehensive test before commit) |
264
336
  <!-- /SECTION:makefile_commands -->
265
337
 
@@ -298,12 +370,23 @@ The system automatically detects and processes files for all supported languages
298
370
 
299
371
  ### Step 2: Query the Codebase
300
372
 
373
+ **Interactive mode:**
374
+
301
375
  Start the interactive RAG CLI:
302
376
 
303
377
  ```bash
304
378
  cgr start --repo-path /path/to/your/repo
305
379
  ```
306
380
 
381
+ **Non-interactive mode (single query):**
382
+
383
+ Run a single query and exit, with output sent to stdout (useful for scripting):
384
+
385
+ ```bash
386
+ python -m codebase_rag.main start --repo-path /path/to/your/repo \
387
+ --ask-agent "What functions call UserService.create_user?"
388
+ ```
389
+
307
390
  ### Step 2.5: Real-Time Graph Updates (Optional)
308
391
 
309
392
  For active development, you can keep your knowledge graph automatically synchronized with code changes using the realtime updater. This is particularly useful when you're actively modifying code and want the AI assistant to always work with the latest codebase structure.
@@ -546,13 +629,16 @@ claude mcp add --transport stdio code-graph-rag \
546
629
  | `list_projects` | List all indexed projects in the knowledge graph database. Returns a list of project names that have been indexed. |
547
630
  | `delete_project` | Delete a specific project from the knowledge graph database. This removes all nodes associated with the project while preserving other projects. Use list_projects first to see available projects. |
548
631
  | `wipe_database` | WARNING: Completely wipe the entire database, removing ALL indexed projects. This cannot be undone. Use delete_project for removing individual projects. |
549
- | `index_repository` | Parse and ingest the repository into the Memgraph knowledge graph. This builds a comprehensive graph of functions, classes, dependencies, and relationships. Note: This preserves other projects - only the current project is re-indexed. |
550
- | `query_code_graph` | Query the codebase knowledge graph using natural language. Ask questions like 'What functions call UserService.create_user?' or 'Show me all classes that implement the Repository interface'. |
632
+ | `index_repository` | WARNING: Clears all data for the current project including its embeddings. Parse and ingest the repository into the Memgraph knowledge graph. Use update_repository for incremental updates. Only use when explicitly requested. |
633
+ | `update_repository` | Update the repository in the Memgraph knowledge graph without clearing existing data. Use this for incremental updates. |
634
+ | `query_code_graph` | Query the codebase knowledge graph using natural language. Use semantic_search unless you know the exact names of classes/functions you are searching for. Ask questions like 'What functions call UserService.create_user?' or 'Show me all classes that implement the Repository interface'. |
551
635
  | `get_code_snippet` | Retrieve source code for a function, class, or method by its qualified name. Returns the source code, file path, line numbers, and docstring. |
552
636
  | `surgical_replace_code` | Surgically replace an exact code block in a file using diff-match-patch. Only modifies the exact target block, leaving the rest unchanged. |
553
637
  | `read_file` | Read the contents of a file from the project. Supports pagination for large files. |
554
638
  | `write_file` | Write content to a file, creating it if it doesn't exist. |
555
639
  | `list_directory` | List contents of a directory in the project. |
640
+ | `semantic_search` | Performs a semantic search for functions based on a natural language query describing their purpose, returning a list of potential matches with similarity scores. Requires the 'semantic' extra to be installed. |
641
+ | `ask_agent` | Ask the Code Graph RAG agent a question about the codebase. Uses the full RAG pipeline to analyze the code graph and provide a detailed answer. Use this for general questions about architecture, functionality, and code relationships. |
556
642
  <!-- /SECTION:mcp_tools -->
557
643
 
558
644
  ### Example Usage
@@ -575,36 +661,36 @@ The knowledge graph uses the following node types and relationships:
575
661
  | Label | Properties |
576
662
  |-----|----------|
577
663
  | Project | `{name: string}` |
578
- | Package | `{qualified_name: string, name: string, path: string}` |
579
- | Folder | `{path: string, name: string}` |
580
- | File | `{path: string, name: string, extension: string}` |
581
- | Module | `{qualified_name: string, name: string, path: string}` |
582
- | Class | `{qualified_name: string, name: string, decorators: list[string]}` |
583
- | Function | `{qualified_name: string, name: string, decorators: list[string]}` |
584
- | Method | `{qualified_name: string, name: string, decorators: list[string]}` |
585
- | Interface | `{qualified_name: string, name: string}` |
586
- | Enum | `{qualified_name: string, name: string}` |
664
+ | Package | `{qualified_name: string, name: string, path: string, absolute_path: string}` |
665
+ | Folder | `{path: string, name: string, absolute_path: string}` |
666
+ | File | `{path: string, name: string, extension: string, absolute_path: string}` |
667
+ | Module | `{qualified_name: string, name: string, path: string, absolute_path: string}` |
668
+ | Class | `{qualified_name: string, name: string, decorators: list[string], path: string, absolute_path: string}` |
669
+ | Function | `{qualified_name: string, name: string, decorators: list[string], path: string, absolute_path: string}` |
670
+ | Method | `{qualified_name: string, name: string, decorators: list[string], path: string, absolute_path: string}` |
671
+ | Interface | `{qualified_name: string, name: string, path: string, absolute_path: string}` |
672
+ | Enum | `{qualified_name: string, name: string, path: string, absolute_path: string}` |
587
673
  | Type | `{qualified_name: string, name: string}` |
588
674
  | Union | `{qualified_name: string, name: string}` |
589
- | ModuleInterface | `{qualified_name: string, name: string, path: string}` |
590
- | ModuleImplementation | `{qualified_name: string, name: string, path: string, implements_module: string}` |
675
+ | ModuleInterface | `{qualified_name: string, name: string, path: string, absolute_path: string}` |
676
+ | ModuleImplementation | `{qualified_name: string, name: string, path: string, absolute_path: string, implements_module: string}` |
591
677
  | ExternalPackage | `{name: string, version_spec: string}` |
678
+ | ExternalModule | `{qualified_name: string, name: string, path: string}` |
592
679
  <!-- /SECTION:node_schemas -->
593
680
 
594
681
  ### Language-Specific Mappings
595
682
 
596
683
  <!-- SECTION:language_mappings -->
597
- - **C**: `function_definition`, `struct_specifier`, `union_specifier`, `enum_specifier`, `call_expression`, `preproc_include`
684
+ - **C**: `enum_specifier`, `function_definition`, `struct_specifier`, `union_specifier`
598
685
  - **C++**: `class_specifier`, `declaration`, `enum_specifier`, `field_declaration`, `function_definition`, `lambda_expression`, `struct_specifier`, `template_declaration`, `union_specifier`
599
686
  - **Java**: `annotation_type_declaration`, `class_declaration`, `constructor_declaration`, `enum_declaration`, `interface_declaration`, `method_declaration`, `record_declaration`
600
687
  - **JavaScript**: `arrow_function`, `class`, `class_declaration`, `function_declaration`, `function_expression`, `generator_function_declaration`, `method_definition`
601
688
  - **Lua**: `function_declaration`, `function_definition`
689
+ - **PHP**: `anonymous_function`, `arrow_function`, `class_declaration`, `enum_declaration`, `function_definition`, `interface_declaration`, `method_declaration`, `trait_declaration`
602
690
  - **Python**: `class_definition`, `function_definition`
603
691
  - **Rust**: `closure_expression`, `enum_item`, `function_item`, `function_signature_item`, `impl_item`, `struct_item`, `trait_item`, `type_item`, `union_item`
604
692
  - **TypeScript**: `abstract_class_declaration`, `arrow_function`, `class`, `class_declaration`, `enum_declaration`, `function_declaration`, `function_expression`, `function_signature`, `generator_function_declaration`, `interface_declaration`, `internal_module`, `method_definition`, `type_alias_declaration`
605
- - **C#**: `anonymous_method_expression`, `class_declaration`, `constructor_declaration`, `destructor_declaration`, `enum_declaration`, `function_pointer_type`, `interface_declaration`, `lambda_expression`, `local_function_statement`, `method_declaration`, `struct_declaration`
606
- - **Go**: `function_declaration`, `method_declaration`, `type_declaration`
607
- - **PHP**: `anonymous_function`, `arrow_function`, `class_declaration`, `enum_declaration`, `function_definition`, `function_static_declaration`, `interface_declaration`, `trait_declaration`
693
+ - **Go**: `function_declaration`, `method_declaration`, `type_alias`, `type_spec`
608
694
  - **Scala**: `class_definition`, `function_declaration`, `function_definition`, `object_definition`, `trait_definition`
609
695
  <!-- /SECTION:language_mappings -->
610
696
 
@@ -619,7 +705,7 @@ The knowledge graph uses the following node types and relationships:
619
705
  | Project, Package, Folder | CONTAINS_MODULE | Module |
620
706
  | Module | DEFINES | Class, Function |
621
707
  | Class | DEFINES_METHOD | Method |
622
- | Module | IMPORTS | Module |
708
+ | Module | IMPORTS | Module, ExternalModule |
623
709
  | Module | EXPORTS | Class, Function |
624
710
  | Module | EXPORTS_MODULE | ModuleInterface |
625
711
  | Module | IMPLEMENTS_MODULE | ModuleImplementation |
@@ -629,6 +715,8 @@ The knowledge graph uses the following node types and relationships:
629
715
  | ModuleImplementation | IMPLEMENTS | ModuleInterface |
630
716
  | Project | DEPENDS_ON_EXTERNAL | ExternalPackage |
631
717
  | Function, Method | CALLS | Function, Method |
718
+ | Module, Function, Method | REFERENCES | Function, Method |
719
+ | Module, Function, Method | INSTANTIATES | Class |
632
720
  <!-- /SECTION:relationship_schemas -->
633
721
 
634
722
  ## 🔧 Configuration
@@ -670,30 +758,32 @@ Configuration is managed through environment variables in `.env` file:
670
758
 
671
759
  ### Custom Ignore Patterns
672
760
 
673
- You can specify additional directories to exclude by creating a `.cgrignore` file in your repository root:
761
+ You can specify additional files and directories to exclude by creating a `.cgrignore` file in your repository root. Patterns follow `.gitignore` conventions:
674
762
 
675
763
  ```
676
764
  # Comments start with #
677
765
  vendor
678
- .custom_cache
679
- my_build_output
766
+ *.gen.ts
767
+ docs/*.md
768
+ /generated
769
+ !bin/keep.py
680
770
  ```
681
771
 
682
- - One directory name per line
683
- - Lines starting with `#` are comments
684
- - Blank lines are ignored
685
- - Patterns are exact directory name matches (not globs)
686
- - Patterns from `.cgrignore` are merged with `--exclude` flags and auto-detected directories
772
+ - Gitignore syntax: `*` matches within a segment, `**` crosses segments, bare names match at any depth, slash-containing patterns are anchored to the root, trailing slash matches directories only
773
+ - Lines starting with `!` un-ignore paths that a default exclusion would skip (explicit excludes always win)
774
+ - Lines starting with `#` are comments; blank lines are ignored
775
+ - Patterns from `.cgrignore` are merged with `--exclude` flags (same syntax) and auto-detected directories
687
776
 
688
777
  ### Key Dependencies
689
778
 
690
779
  <!-- SECTION:dependencies -->
691
780
  - **loguru**: Python logging made (stupidly) simple
692
781
  - **mcp**: Model Context Protocol SDK
693
- - **pydantic-ai**: Agent Framework / shim to use Pydantic with LLMs
782
+ - **pydantic-ai**: AI Agent Framework, the Pydantic way
694
783
  - **pydantic-settings**: Settings management using Pydantic
695
784
  - **pymgclient**: Memgraph database adapter for Python language
696
785
  - **python-dotenv**: Read key-value pairs from a .env file and set them as environment variables
786
+ - **tiktoken**: tiktoken is a fast BPE tokeniser for use with OpenAI's models
697
787
  - **toml**: Python Library for Tom's Obvious, Minimal Language
698
788
  - **tree-sitter-python**: Python grammar for tree-sitter
699
789
  - **tree-sitter**: Python bindings to the Tree-sitter parsing library
@@ -706,6 +796,8 @@ my_build_output
706
796
  - **protobuf**
707
797
  - **defusedxml**: XML bomb protection for Python stdlib modules
708
798
  - **huggingface-hub**: Client library to download and publish models, datasets and other repos on the huggingface.co hub
799
+ - **griffe**: Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API.
800
+ - **pathspec**: Utility library for gitignore style pattern matching of file paths.
709
801
  <!-- /SECTION:dependencies -->
710
802
 
711
803
  ## 🤖 Agentic Workflow & Tools
@@ -720,11 +812,10 @@ The agent has access to a suite of tools to understand and interact with the cod
720
812
  | Tool | Description |
721
813
  |----|-----------|
722
814
  | `query_graph` | Query the codebase knowledge graph using natural language questions. Ask in plain English about classes, functions, methods, dependencies, or code structure. Examples: 'Find all functions that call each other', 'What classes are in the user module', 'Show me functions with the longest call chains'. |
723
- | `read_file` | Reads the content of text-based files. For documents like PDFs or images, use the 'analyze_document' tool instead. |
815
+ | `read_file` | Reads the content of text-based files. Images and PDFs the user references are attached inline; read them directly. |
724
816
  | `create_file` | Creates a new file with content. IMPORTANT: Check file existence first! Overwrites completely WITHOUT showing diff. Use only for new files, not existing file modifications. |
725
817
  | `replace_code` | Surgically replaces specific code blocks in files. Requires exact target code and replacement. Only modifies the specified block, leaving rest of file unchanged. True surgical patching. |
726
818
  | `list_directory` | Lists the contents of a directory to explore the codebase. |
727
- | `analyze_document` | Analyzes documents (PDFs, images) to answer questions about their content. |
728
819
  | `execute_shell` | Executes shell commands from allowlist. Read-only commands run without approval; write operations require user confirmation. |
729
820
  | `semantic_search` | Performs a semantic search for functions based on a natural language query describing their purpose, returning a list of potential matches with similarity scores. |
730
821
  | `get_function_source` | Retrieves the source code for a specific function or method using its internal node ID, typically obtained from a semantic search result. |
@@ -902,3 +993,7 @@ We also offer custom development, integration consulting, technical support cont
902
993
  ## Star History
903
994
 
904
995
  [![Star History Chart](https://api.star-history.com/svg?repos=vitali87/code-graph-rag&type=Date)](https://www.star-history.com/#vitali87/code-graph-rag&Date)
996
+
997
+ ## Fork History
998
+
999
+ [![Fork History Chart](https://fork-history.site/svg?repos=vitali87/code-graph-rag)](https://fork-history.site/#vitali87/code-graph-rag)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-graph-rag
3
- Version: 0.0.148
3
+ Version: 0.0.209
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
@@ -14,34 +14,38 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
14
  Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
17
18
  Requires-Python: >=3.12
18
19
  Description-Content-Type: text/markdown
19
20
  License-File: LICENSE
20
21
  Requires-Dist: loguru>=0.7.3
21
- Requires-Dist: mcp>=1.21.1
22
- Requires-Dist: pydantic-ai>=1.70.0
23
- Requires-Dist: pydantic-settings>=2.0.0
24
- Requires-Dist: pymgclient>=1.4.0
25
- Requires-Dist: python-dotenv>=1.1.0
22
+ Requires-Dist: mcp>=1.25.0
23
+ Requires-Dist: pydantic-ai>=1.102.0
24
+ Requires-Dist: pydantic-settings>=2.12.0
25
+ Requires-Dist: pymgclient>=1.5.1
26
+ Requires-Dist: python-dotenv>=1.2.1
26
27
  Requires-Dist: tiktoken>=0.12.0
27
28
  Requires-Dist: toml>=0.10.2
28
- Requires-Dist: tree-sitter-python>=0.23.6
29
+ Requires-Dist: tree-sitter-python>=0.25.0
29
30
  Requires-Dist: tree-sitter==0.25.2
30
31
  Requires-Dist: watchdog>=6.0.0
31
- Requires-Dist: typer>=0.12.5
32
- Requires-Dist: rich>=13.7.1
33
- Requires-Dist: prompt-toolkit>=3.0.0
32
+ Requires-Dist: typer>=0.21.1
33
+ Requires-Dist: rich>=14.2.0
34
+ Requires-Dist: prompt-toolkit>=3.0.52
34
35
  Requires-Dist: diff-match-patch>=20241021
35
- Requires-Dist: click>=8.0.0
36
- Requires-Dist: protobuf>=5.27.0
36
+ Requires-Dist: click>=8.3.1
37
+ Requires-Dist: protobuf>=6.33.5
37
38
  Requires-Dist: defusedxml>=0.7.1
38
- Requires-Dist: huggingface-hub[hf-xet]>=0.36.0
39
+ Requires-Dist: huggingface-hub[hf-xet]>=1.7.2
40
+ Requires-Dist: griffe<2,>=1.0
41
+ Requires-Dist: pathspec>=1.0.4
39
42
  Provides-Extra: test
40
43
  Requires-Dist: pytest>=8.4.1; extra == "test"
41
44
  Requires-Dist: pytest-asyncio>=1.0.0; extra == "test"
42
45
  Requires-Dist: pytest-cov>=4.0.0; extra == "test"
43
46
  Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
44
47
  Requires-Dist: testcontainers>=4.9.0; extra == "test"
48
+ Requires-Dist: libclang>=18.1.1; extra == "test"
45
49
  Provides-Extra: treesitter-full
46
50
  Requires-Dist: tree-sitter-python>=0.23.6; extra == "treesitter-full"
47
51
  Requires-Dist: tree-sitter-javascript>=0.23.1; extra == "treesitter-full"
@@ -53,6 +57,7 @@ Requires-Dist: tree-sitter-java>=0.23.5; extra == "treesitter-full"
53
57
  Requires-Dist: tree-sitter-c>=0.24.1; extra == "treesitter-full"
54
58
  Requires-Dist: tree-sitter-cpp>=0.23.0; extra == "treesitter-full"
55
59
  Requires-Dist: tree-sitter-lua>=0.0.19; extra == "treesitter-full"
60
+ Requires-Dist: tree-sitter-php>=0.24.1; extra == "treesitter-full"
56
61
  Provides-Extra: semantic
57
62
  Requires-Dist: qdrant-client>=1.9.0; extra == "semantic"
58
63
  Requires-Dist: torch>=2.6.0; extra == "semantic"
@@ -95,7 +100,7 @@ The package installs a `cgr` command.
95
100
  **Start Memgraph, parse a repo, and query it:**
96
101
 
97
102
  ```bash
98
- docker compose up -d # start Memgraph
103
+ cgr daemon up # start Memgraph + Qdrant
99
104
  cgr start --repo-path ./my-project \
100
105
  --update-graph --clean # parse & launch interactive chat
101
106
  ```
@@ -10,12 +10,14 @@ 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/cgr_state.py
13
14
  codebase_rag/cli.py
14
15
  codebase_rag/cli_help.py
15
16
  codebase_rag/config.py
16
17
  codebase_rag/constants.py
17
18
  codebase_rag/cypher_queries.py
18
19
  codebase_rag/decorators.py
20
+ codebase_rag/docker-compose.yaml
19
21
  codebase_rag/embedder.py
20
22
  codebase_rag/exceptions.py
21
23
  codebase_rag/graph_loader.py
@@ -34,6 +36,7 @@ codebase_rag/types_defs.py
34
36
  codebase_rag/unixcoder.py
35
37
  codebase_rag/vector_store.py
36
38
  codebase_rag/mcp/__init__.py
39
+ codebase_rag/mcp/client.py
37
40
  codebase_rag/mcp/server.py
38
41
  codebase_rag/mcp/tools.py
39
42
  codebase_rag/parsers/__init__.py
@@ -41,9 +44,11 @@ codebase_rag/parsers/call_processor.py
41
44
  codebase_rag/parsers/call_resolver.py
42
45
  codebase_rag/parsers/definition_processor.py
43
46
  codebase_rag/parsers/dependency_parser.py
47
+ codebase_rag/parsers/export_detection.py
44
48
  codebase_rag/parsers/factory.py
45
49
  codebase_rag/parsers/function_ingest.py
46
50
  codebase_rag/parsers/import_processor.py
51
+ codebase_rag/parsers/python_source_roots.py
47
52
  codebase_rag/parsers/stdlib_extractor.py
48
53
  codebase_rag/parsers/structure_processor.py
49
54
  codebase_rag/parsers/type_inference.py
@@ -58,13 +63,22 @@ codebase_rag/parsers/class_ingest/parent_extraction.py
58
63
  codebase_rag/parsers/class_ingest/relationships.py
59
64
  codebase_rag/parsers/class_ingest/utils.py
60
65
  codebase_rag/parsers/cpp/__init__.py
66
+ codebase_rag/parsers/cpp/type_inference.py
61
67
  codebase_rag/parsers/cpp/utils.py
68
+ codebase_rag/parsers/cpp_frontend/__init__.py
69
+ codebase_rag/parsers/cpp_frontend/constants.py
70
+ codebase_rag/parsers/cpp_frontend/frontend.py
71
+ codebase_rag/parsers/cpp_frontend/qn.py
72
+ codebase_rag/parsers/go/__init__.py
73
+ codebase_rag/parsers/go/type_inference.py
74
+ codebase_rag/parsers/go/utils.py
62
75
  codebase_rag/parsers/handlers/__init__.py
63
76
  codebase_rag/parsers/handlers/base.py
64
77
  codebase_rag/parsers/handlers/cpp.py
65
78
  codebase_rag/parsers/handlers/java.py
66
79
  codebase_rag/parsers/handlers/js_ts.py
67
80
  codebase_rag/parsers/handlers/lua.py
81
+ codebase_rag/parsers/handlers/php.py
68
82
  codebase_rag/parsers/handlers/protocol.py
69
83
  codebase_rag/parsers/handlers/python.py
70
84
  codebase_rag/parsers/handlers/registry.py
@@ -93,15 +107,21 @@ codebase_rag/parsers/rs/__init__.py
93
107
  codebase_rag/parsers/rs/utils.py
94
108
  codebase_rag/providers/__init__.py
95
109
  codebase_rag/providers/base.py
110
+ codebase_rag/providers/litellm.py
96
111
  codebase_rag/services/__init__.py
112
+ codebase_rag/services/anthropic_token_counter.py
97
113
  codebase_rag/services/graph_service.py
98
114
  codebase_rag/services/llm.py
99
115
  codebase_rag/services/protobuf_service.py
116
+ codebase_rag/stack/__init__.py
117
+ codebase_rag/stack/cli.py
118
+ codebase_rag/stack/constants.py
119
+ codebase_rag/stack/health.py
120
+ codebase_rag/stack/manager.py
100
121
  codebase_rag/tools/__init__.py
101
122
  codebase_rag/tools/code_retrieval.py
102
123
  codebase_rag/tools/codebase_query.py
103
124
  codebase_rag/tools/directory_lister.py
104
- codebase_rag/tools/document_analyzer.py
105
125
  codebase_rag/tools/file_editor.py
106
126
  codebase_rag/tools/file_reader.py
107
127
  codebase_rag/tools/file_writer.py
@@ -114,8 +134,14 @@ codebase_rag/utils/__init__.py
114
134
  codebase_rag/utils/dependencies.py
115
135
  codebase_rag/utils/fqn_resolver.py
116
136
  codebase_rag/utils/path_utils.py
137
+ codebase_rag/utils/rich_markdown.py
117
138
  codebase_rag/utils/source_extraction.py
118
139
  codebase_rag/utils/token_utils.py
140
+ codebase_rag/workspaces/__init__.py
141
+ codebase_rag/workspaces/cli.py
142
+ codebase_rag/workspaces/constants.py
143
+ codebase_rag/workspaces/models.py
144
+ codebase_rag/workspaces/storage.py
119
145
  codec/__init__.py
120
146
  codec/schema_pb2.py
121
147
  codec/schema_pb2.pyi