codegraphcontext-rust 0.5.5__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 (140) hide show
  1. codegraphcontext_rust-0.5.5/LICENSE +21 -0
  2. codegraphcontext_rust-0.5.5/PKG-INFO +537 -0
  3. codegraphcontext_rust-0.5.5/README.md +483 -0
  4. codegraphcontext_rust-0.5.5/pyproject.toml +99 -0
  5. codegraphcontext_rust-0.5.5/rust/Cargo.lock +609 -0
  6. codegraphcontext_rust-0.5.5/rust/Cargo.toml +3 -0
  7. codegraphcontext_rust-0.5.5/rust/cgc-core/Cargo.toml +29 -0
  8. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/c_lang.rs +716 -0
  9. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/cpp.rs +950 -0
  10. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/csharp.rs +705 -0
  11. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/dart.rs +542 -0
  12. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/elixir.rs +639 -0
  13. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/go.rs +746 -0
  14. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/haskell.rs +478 -0
  15. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/java.rs +669 -0
  16. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/javascript.rs +940 -0
  17. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/kotlin.rs +788 -0
  18. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/mod.rs +181 -0
  19. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/perl.rs +392 -0
  20. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/php.rs +640 -0
  21. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/python.rs +850 -0
  22. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/ruby.rs +542 -0
  23. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/rust_lang.rs +711 -0
  24. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/scala.rs +507 -0
  25. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/swift.rs +535 -0
  26. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/tsx.rs +848 -0
  27. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lang/typescript.rs +1092 -0
  28. codegraphcontext_rust-0.5.5/rust/cgc-core/src/lib.rs +5 -0
  29. codegraphcontext_rust-0.5.5/rust/cgc-core/src/parser.rs +221 -0
  30. codegraphcontext_rust-0.5.5/rust/cgc-core/src/resolution/calls.rs +488 -0
  31. codegraphcontext_rust-0.5.5/rust/cgc-core/src/resolution/inheritance.rs +199 -0
  32. codegraphcontext_rust-0.5.5/rust/cgc-core/src/resolution/mod.rs +2 -0
  33. codegraphcontext_rust-0.5.5/rust/cgc-core/src/sanitize.rs +37 -0
  34. codegraphcontext_rust-0.5.5/rust/cgc-core/src/types.rs +92 -0
  35. codegraphcontext_rust-0.5.5/rust/cgc-python/Cargo.toml +12 -0
  36. codegraphcontext_rust-0.5.5/rust/cgc-python/src/conversions.rs +174 -0
  37. codegraphcontext_rust-0.5.5/rust/cgc-python/src/lib.rs +479 -0
  38. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/Cargo.toml +11 -0
  39. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/build.rs +13 -0
  40. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/src/grammar/alloc.h +54 -0
  41. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/src/grammar/array.h +291 -0
  42. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/src/grammar/parser.c +408875 -0
  43. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/src/grammar/parser.h +286 -0
  44. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/src/grammar/scanner.c +1237 -0
  45. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/src/grammar/tree_sitter/parser.h +286 -0
  46. codegraphcontext_rust-0.5.5/rust/tree-sitter-perl-vendor/src/lib.rs +24 -0
  47. codegraphcontext_rust-0.5.5/src/codegraphcontext/__init__.py +2 -0
  48. codegraphcontext_rust-0.5.5/src/codegraphcontext/__main__.py +5 -0
  49. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/__init__.py +1 -0
  50. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/cli_helpers.py +774 -0
  51. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/config_manager.py +1051 -0
  52. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/main.py +2386 -0
  53. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/registry_commands.py +404 -0
  54. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/setup_macos.py +93 -0
  55. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/setup_wizard.py +991 -0
  56. codegraphcontext_rust-0.5.5/src/codegraphcontext/cli/visualizer.py +50 -0
  57. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/__init__.py +165 -0
  58. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/bundle_registry.py +181 -0
  59. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/cgc_bundle.py +858 -0
  60. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/cgcignore.py +118 -0
  61. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/database.py +273 -0
  62. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/database_falkordb.py +480 -0
  63. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/database_falkordb_remote.py +199 -0
  64. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/database_kuzu.py +636 -0
  65. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/falkor_worker.py +132 -0
  66. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/jobs.py +132 -0
  67. codegraphcontext_rust-0.5.5/src/codegraphcontext/core/watcher.py +260 -0
  68. codegraphcontext_rust-0.5.5/src/codegraphcontext/prompts.py +125 -0
  69. codegraphcontext_rust-0.5.5/src/codegraphcontext/server.py +471 -0
  70. codegraphcontext_rust-0.5.5/src/codegraphcontext/tool_definitions.py +220 -0
  71. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/__init__.py +0 -0
  72. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/advanced_language_query_tool.py +103 -0
  73. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/code_finder.py +1160 -0
  74. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/graph_builder.py +337 -0
  75. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/handlers/analysis_handlers.py +114 -0
  76. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/handlers/indexing_handlers.py +116 -0
  77. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/handlers/management_handlers.py +339 -0
  78. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/handlers/query_handlers.py +83 -0
  79. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/handlers/watcher_handlers.py +83 -0
  80. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/__init__.py +1 -0
  81. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/constants.py +25 -0
  82. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/discovery.py +64 -0
  83. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/engine.py +109 -0
  84. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/persistence/__init__.py +3 -0
  85. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/persistence/parquet_loader.py +643 -0
  86. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/persistence/writer.py +1114 -0
  87. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/pipeline.py +171 -0
  88. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/pre_scan.py +105 -0
  89. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/resolution/__init__.py +8 -0
  90. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/resolution/calls.py +253 -0
  91. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/resolution/inheritance.py +91 -0
  92. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/sanitize.py +41 -0
  93. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/schema.py +79 -0
  94. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/schema_contract.py +44 -0
  95. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/indexing/scip_pipeline.py +140 -0
  96. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/c.py +563 -0
  97. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/cpp.py +616 -0
  98. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/csharp.py +551 -0
  99. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/dart.py +378 -0
  100. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/elixir.py +460 -0
  101. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/go.py +499 -0
  102. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/haskell.py +426 -0
  103. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/java.py +500 -0
  104. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/javascript.py +589 -0
  105. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/kotlin.py +640 -0
  106. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/perl.py +260 -0
  107. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/php.py +519 -0
  108. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/python.py +576 -0
  109. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/ruby.py +537 -0
  110. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/rust.py +295 -0
  111. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/scala.py +519 -0
  112. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/swift.py +491 -0
  113. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/typescript.py +575 -0
  114. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/languages/typescriptjsx.py +151 -0
  115. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/package_resolver.py +472 -0
  116. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +5 -0
  117. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +87 -0
  118. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +5 -0
  119. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +5 -0
  120. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +5 -0
  121. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +5 -0
  122. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +5 -0
  123. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +5 -0
  124. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +5 -0
  125. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +5 -0
  126. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +5 -0
  127. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +5 -0
  128. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +5 -0
  129. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +5 -0
  130. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +5 -0
  131. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/scip_indexer.py +467 -0
  132. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/scip_pb2.py +2455 -0
  133. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/system.py +133 -0
  134. codegraphcontext_rust-0.5.5/src/codegraphcontext/tools/tree_sitter_parser.py +103 -0
  135. codegraphcontext_rust-0.5.5/src/codegraphcontext/utils/debug_log.py +90 -0
  136. codegraphcontext_rust-0.5.5/src/codegraphcontext/utils/path_ignore.py +55 -0
  137. codegraphcontext_rust-0.5.5/src/codegraphcontext/utils/repo_path.py +27 -0
  138. codegraphcontext_rust-0.5.5/src/codegraphcontext/utils/tree_sitter_manager.py +285 -0
  139. codegraphcontext_rust-0.5.5/src/codegraphcontext/utils/visualize_graph.py +0 -0
  140. codegraphcontext_rust-0.5.5/src/codegraphcontext/viz/server.py +282 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,537 @@
1
+ Metadata-Version: 2.4
2
+ Name: codegraphcontext-rust
3
+ Version: 0.5.5
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Python :: 3.10
6
+ Classifier: Programming Language :: Python :: 3.11
7
+ Classifier: Programming Language :: Python :: 3.12
8
+ Classifier: Programming Language :: Python :: 3.13
9
+ Classifier: Programming Language :: Rust
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
15
+ Requires-Dist: neo4j>=5.15.0
16
+ Requires-Dist: watchdog>=3.0.0
17
+ Requires-Dist: stdlibs>=2023.11.18
18
+ Requires-Dist: typer[all]>=0.9.0
19
+ Requires-Dist: rich>=13.7.0
20
+ Requires-Dist: inquirerpy>=0.3.4
21
+ Requires-Dist: python-dotenv>=1.0.0
22
+ Requires-Dist: tree-sitter>=0.21.0
23
+ Requires-Dist: tree-sitter-language-pack>=0.6.0
24
+ Requires-Dist: tree-sitter-c-sharp>=0.21.0
25
+ Requires-Dist: pyyaml
26
+ Requires-Dist: nbformat
27
+ Requires-Dist: nbconvert>=7.16.6
28
+ Requires-Dist: pathspec>=0.12.1
29
+ Requires-Dist: falkordb>=0.1.0
30
+ Requires-Dist: requests>=2.28.0
31
+ Requires-Dist: falkordblite>=0.1.0 ; python_full_version >= '3.12' and sys_platform != 'win32'
32
+ Requires-Dist: kuzu>=0.4.0 ; (python_full_version < '3.10' and sys_platform == 'win32') or (python_full_version >= '3.12' and sys_platform == 'win32') or (python_full_version >= '3.10' and python_full_version < '3.12')
33
+ Requires-Dist: fastapi>=0.100.0
34
+ Requires-Dist: uvicorn>=0.22.0
35
+ Requires-Dist: pytest>=7.4.0 ; extra == 'dev'
36
+ Requires-Dist: black>=23.11.0 ; extra == 'dev'
37
+ Requires-Dist: pytest-asyncio>=0.21.0 ; extra == 'dev'
38
+ Requires-Dist: tree-sitter>=0.21.0 ; extra == 'parsing'
39
+ Requires-Dist: tree-sitter-language-pack>=0.6.0 ; extra == 'parsing'
40
+ Requires-Dist: tree-sitter-c-sharp>=0.21.0 ; extra == 'parsing'
41
+ Provides-Extra: dev
42
+ Provides-Extra: parsing
43
+ License-File: LICENSE
44
+ Summary: Rust-accelerated code indexing engine for CodeGraphContext. 19 languages, 5-18x faster parsing via tree-sitter + rayon.
45
+ Author: tinhthanh
46
+ Author-email: Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
47
+ Requires-Python: >=3.10
48
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
49
+ Project-URL: Bug Tracker, https://github.com/tinhthanh/CodeGraphContext/issues
50
+ Project-URL: Homepage, https://github.com/tinhthanh/CodeGraphContext
51
+ Project-URL: Repository, https://github.com/tinhthanh/CodeGraphContext
52
+ Project-URL: Upstream, https://github.com/CodeGraphContext/CodeGraphContext
53
+
54
+ # 🏗️ CodeGraphContext (CGC)
55
+
56
+ **Turn code repositories into a queryable graph for AI agents.**
57
+
58
+ 🌐 **Languages:**
59
+ - 🇬🇧 [English](README.md)
60
+ - 🇨🇳 [中文](README.zh-CN.md)
61
+ - 🇰🇷 [한국어](README.kor.md)
62
+ - 🇺🇦 [Українська](README.uk.md)
63
+ - 🇷🇺 [Русский](README.ru-RU.md)
64
+ - 🇯🇵 日本語 (Soon)
65
+ - 🇪🇸 Español (Soon)
66
+
67
+ 🌍 **Help translate CodeGraphContext to your language by raising an issue & PR on https://github.com/Shashankss1205/CodeGraphContext/issues!**
68
+
69
+ <p align="center">
70
+ <br>
71
+ <b>Bridge the gap between deep code graphs and AI context.</b>
72
+ <br><br>
73
+ <a href="https://pypi.org/project/codegraphcontext/">
74
+ <img src="https://img.shields.io/pypi/v/codegraphcontext?style=flat-square&logo=pypi" alt="PyPI Version">
75
+ </a>
76
+ <a href="https://pypi.org/project/codegraphcontext/">
77
+ <img src="https://img.shields.io/pypi/dm/codegraphcontext?style=flat-square" alt="PyPI Downloads">
78
+ </a>
79
+ <a href="LICENSE">
80
+ <img src="https://img.shields.io/github/license/CodeGraphContext/CodeGraphContext?style=flat-square" alt="License">
81
+ </a>
82
+ <img src="https://img.shields.io/badge/MCP-Compatible-green?style=flat-square" alt="MCP Compatible">
83
+ <a href="https://discord.gg/VCwUdCnn">
84
+ <img src="https://img.shields.io/discord/1421769154507309150?label=Discord&logo=discord&logoColor=white&style=flat-square">
85
+ </a>
86
+ <br><br>
87
+ <a href="https://github.com/CodeGraphContext/CodeGraphContext/stargazers">
88
+ <img src="https://img.shields.io/github/stars/CodeGraphContext/CodeGraphContext?style=flat-square&logo=github" alt="Stars">
89
+ </a>
90
+ <a href="https://github.com/CodeGraphContext/CodeGraphContext/network/members">
91
+ <img src="https://img.shields.io/github/forks/CodeGraphContext/CodeGraphContext?style=flat-square&logo=github" alt="Forks">
92
+ </a>
93
+ <a href="https://github.com/CodeGraphContext/CodeGraphContext/issues">
94
+ <img src="https://img.shields.io/github/issues-raw/CodeGraphContext/CodeGraphContext?style=flat-square&logo=github" alt="Issues">
95
+ </a>
96
+ <a href="https://github.com/CodeGraphContext/CodeGraphContext/pulls">
97
+ <img src="https://img.shields.io/github/issues-pr/CodeGraphContext/CodeGraphContext?style=flat-square&logo=github" alt="PRs">
98
+ </a>
99
+ <a href="https://github.com/CodeGraphContext/CodeGraphContext/graphs/contributors">
100
+ <img src="https://img.shields.io/github/contributors/CodeGraphContext/CodeGraphContext?style=flat-square&logo=github" alt="Contributors">
101
+ </a>
102
+ <br><br>
103
+ <a href="https://github.com/CodeGraphContext/CodeGraphContext/actions/workflows/test.yml">
104
+ <img src="https://github.com/CodeGraphContext/CodeGraphContext/actions/workflows/test.yml/badge.svg" alt="Tests">
105
+ </a>
106
+ <a href="https://github.com/CodeGraphContext/CodeGraphContext/actions/workflows/e2e-tests.yml">
107
+ <img src="https://github.com/CodeGraphContext/CodeGraphContext/actions/workflows/e2e-tests.yml/badge.svg" alt="E2E Tests">
108
+ </a>
109
+ <a href="http://codegraphcontext.vercel.app/">
110
+ <img src="https://img.shields.io/badge/website-up-brightgreen?style=flat-square" alt="Website">
111
+ </a>
112
+ <a href="https://CodeGraphContext.github.io/CodeGraphContext/">
113
+ <img src="https://img.shields.io/badge/docs-GitHub%20Pages-blue?style=flat-square" alt="Docs">
114
+ </a>
115
+ <a href="https://youtu.be/KYYSdxhg1xU">
116
+ <img src="https://img.shields.io/badge/YouTube-Watch%20Demo-red?style=flat-square&logo=youtube" alt="YouTube Demo">
117
+ </a>
118
+ </p>
119
+
120
+
121
+ A powerful **MCP server** and **CLI toolkit** that indexes local code into a graph database to provide context to AI assistants and developers. Use it as a standalone CLI for comprehensive code analysis or connect it to your favorite AI IDE via MCP for AI-powered code understanding.
122
+
123
+ ---
124
+
125
+ ## 📍 Quick Navigation
126
+ * [🚀 Quick Start](#quick-start)
127
+ * [🌐 Supported Programming Languages](#supported-programming-languages)
128
+ * [🛠️ CLI Toolkit](#for-cli-toolkit-mode)
129
+ * [🤖 MCP Server](#-for-mcp-server-mode)
130
+ * [🗄️ Database Options](#database-options)
131
+
132
+ ---
133
+
134
+ ## ✨ Experience CGC
135
+
136
+
137
+ ### 👨🏻‍💻 Installation and CLI
138
+ > Install in seconds with pip and unlock a powerful CLI for code graph analysis.
139
+ ![Install and unlock the CLI instantly](https://github.com/CodeGraphContext/CodeGraphContext/blob/main/images/install&cli.gif)
140
+
141
+
142
+ ### 🛠️ Indexing in Seconds
143
+ > The CLI intelligently parses your tree-sitter nodes to build the graph.
144
+ ![Indexing using an MCP client](https://github.com/CodeGraphContext/CodeGraphContext/blob/main/images/Indexing.gif)
145
+
146
+ ### 🤖 Powering your AI Assistant
147
+ > Use natural language to query complex call-chains via MCP.
148
+ ![Using the MCP server](https://github.com/CodeGraphContext/CodeGraphContext/blob/main/images/Usecase.gif)
149
+
150
+ ---
151
+
152
+ ## Project Details
153
+ - **Version:** 0.4.2
154
+ - **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
155
+ - **License:** MIT License (See [LICENSE](LICENSE) for details)
156
+ - **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
157
+
158
+ ---
159
+
160
+ ## 👨‍💻 Maintainer
161
+ **CodeGraphContext** is created and actively maintained by:
162
+
163
+ **Shashank Shekhar Singh**
164
+ - 📧 Email: [shashankshekharsingh1205@gmail.com](mailto:shashankshekharsingh1205@gmail.com)
165
+ - 🐙 GitHub: [@Shashankss1205](https://github.com/Shashankss1205)
166
+ - 🔗 LinkedIn: [Shashank Shekhar Singh](https://www.linkedin.com/in/shashank-shekhar-singh-a67282228/)
167
+ - 🌐 Website: [codegraphcontext.vercel.app](http://codegraphcontext.vercel.app/)
168
+
169
+ *Contributions and feedback are always welcome! Feel free to reach out for questions, suggestions, or collaboration opportunities.*
170
+
171
+ ---
172
+
173
+ ## Star History
174
+ [![Star History Chart](https://api.star-history.com/svg?repos=CodeGraphContext/CodeGraphContext&type=Date)](https://www.star-history.com/#CodeGraphContext/CodeGraphContext&Date)
175
+
176
+ ---
177
+
178
+ ## Features
179
+ - **Code Indexing:** Analyzes code and builds a knowledge graph of its components.
180
+ - **Relationship Analysis:** Query for callers, callees, class hierarchies, call chains and more.
181
+ - **Pre-indexed Bundles:** Load famous repositories instantly with `.cgc` bundles - no indexing required! ([Learn more](docs/BUNDLES.md))
182
+ - **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`cgc watch`).
183
+ - **Interactive Setup:** A user-friendly command-line wizard for easy setup.
184
+ - **Dual Mode:** Works as a standalone **CLI toolkit** for developers and as an **MCP server** for AI agents.
185
+ - **Multi-Language Support:** Full support for 14 programming languages.
186
+ - **Flexible Database Backend:** KùzuDB (default on Windows), FalkorDB Lite (typical embedded default on Unix when installed), FalkorDB Remote, or Neo4j (all platforms via Docker/native).
187
+
188
+ ---
189
+
190
+ ## Supported Programming Languages
191
+
192
+ CodeGraphContext provides comprehensive parsing and analysis for the following languages:
193
+
194
+ | | Language | | Language | | Language |
195
+ | :--- | :--- | :--- | :--- | :--- | :--- |
196
+ | 🐍 | **Python** | 📜 | **JavaScript** | 🔷 | **TypeScript** |
197
+ | ☕ | **Java** | 🏗️ | **C / C++** | #️⃣ | **C#** |
198
+ | 🐹 | **Go** | 🦀 | **Rust** | 💎 | **Ruby** |
199
+ | 🐘 | **PHP** | 🍎 | **Swift** | 🎨 | **Kotlin** |
200
+ | 🎯 | **Dart** | 🐪 | **Perl** | | |
201
+
202
+ Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
203
+
204
+ ---
205
+
206
+ ## Database Options
207
+
208
+ CodeGraphContext supports multiple graph database backends to suit your environment:
209
+
210
+ | Feature | KùzuDB | FalkorDB Lite | Neo4j |
211
+ | :--- | :--- | :--- | :--- |
212
+ | **Typical default** | **Windows** (embedded, when `kuzu` is installed) | **Unix** (Python 3.12+, when `falkordblite` works) | When explicitly configured |
213
+ | **Setup** | Zero-config / Embedded | Zero-config / In-process | Docker / External |
214
+ | **Platform** | **All (Windows Native, macOS, Linux)** | Unix-only (Linux/macOS/WSL) | All Platforms |
215
+ | **Use Case** | Desktop, IDE, Local development | Specialized Unix development | Enterprise, Massive graphs |
216
+ | **Requirement**| `pip install kuzu` | `pip install falkordblite` | Neo4j Server / Docker |
217
+ | **Speed** | ⚡ Extremely Fast | ⚡ Fast | 🚀 Scalable |
218
+ | **Persistence**| Yes (to disk) | Yes (to disk) | Yes (to disk) |
219
+
220
+ ---
221
+
222
+ ## Used By
223
+
224
+ CodeGraphContext is already being explored by developers and projects for:
225
+
226
+ - **Static code analysis in AI assistants**
227
+ - **Graph-based visualization of projects**
228
+ - **Dead code and complexity detection**
229
+
230
+ _If you’re using CodeGraphContext in your project, feel free to open a PR and add it here! 🚀_
231
+
232
+ ---
233
+
234
+ ## Dependencies
235
+
236
+ - `neo4j>=5.15.0`
237
+ - `watchdog>=3.0.0`
238
+ - `stdlibs>=2023.11.18`
239
+ - `typer[all]>=0.9.0`
240
+ - `rich>=13.7.0`
241
+ - `inquirerpy>=0.3.7`
242
+ - `python-dotenv>=1.0.0`
243
+ - `tree-sitter>=0.21.0`
244
+ - `tree-sitter-language-pack>=0.6.0`
245
+ - `pyyaml`
246
+ - `pytest`
247
+ - `nbformat`
248
+ - `nbconvert>=7.16.6`
249
+ - `pathspec>=0.12.1`
250
+
251
+ **Note:** Python 3.10-3.14 is supported.
252
+
253
+ ---
254
+
255
+ ## Quick Start
256
+ ### Install the core toolkit
257
+ ```
258
+ pip install codegraphcontext
259
+ ```
260
+
261
+ ### If 'cgc' command isn't found, run our one-line fix:
262
+ ```
263
+ curl -sSL https://raw.githubusercontent.com/CodeGraphContext/CodeGraphContext/main/scripts/post_install_fix.sh | bash
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Getting Started
269
+
270
+ ### 📋 Understanding CodeGraphContext Modes
271
+ CodeGraphContext operates in **two modes**, and you can use either or both:
272
+
273
+ #### 🛠️ Mode 1: CLI Toolkit (Standalone)
274
+ Use CodeGraphContext as a **powerful command-line toolkit** for code analysis:
275
+ - Index and analyze codebases directly from your terminal
276
+ - Query code relationships, find dead code, analyze complexity
277
+ - Visualize code graphs and dependencies
278
+ - Perfect for developers who want direct control via CLI commands
279
+
280
+ #### 🤖 Mode 2: MCP Server (AI-Powered)
281
+ Use CodeGraphContext as an **MCP server** for AI assistants:
282
+ - Connect to AI IDEs (VS Code, Cursor, Windsurf, Claude, Kiro, etc.)
283
+ - Let AI agents query your codebase using natural language
284
+ - Automatic code understanding and relationship analysis
285
+ - Perfect for AI-assisted development workflows
286
+
287
+ **You can use both modes!** Install once, then use CLI commands directly OR connect to your AI assistant.
288
+
289
+ ### Installation (Both Modes)
290
+
291
+ 1. **Install:** `pip install codegraphcontext`
292
+ <details>
293
+ <summary>⚙️ Troubleshooting: In case, command <code>cgc</code> not found</summary>
294
+
295
+ If you encounter <i>"cgc: command not found"</i> after installation, run the PATH fix script:
296
+
297
+ **Linux/Mac:**
298
+ ```bash
299
+ # Download the fix script
300
+ curl -O https://raw.githubusercontent.com/CodeGraphContext/CodeGraphContext/main/scripts/post_install_fix.sh
301
+
302
+ # Make it executable
303
+ chmod +x post_install_fix.sh
304
+
305
+ # Run the script
306
+ ./post_install_fix.sh
307
+
308
+ # Restart your terminal or reload shell config
309
+ source ~/.bashrc # or ~/.zshrc for zsh users
310
+ ```
311
+
312
+ **Windows (PowerShell):**
313
+ ```powershell
314
+ # Download the fix script
315
+ curl -O https://raw.githubusercontent.com/CodeGraphContext/CodeGraphContext/main/scripts/post_install_fix.sh
316
+
317
+ # Run with bash (requires Git Bash or WSL)
318
+ bash post_install_fix.sh
319
+
320
+ # Restart PowerShell or reload profile
321
+ . $PROFILE
322
+ ```
323
+ </details>
324
+
325
+ 2. **Database Setup (Automatic)**
326
+
327
+ - **KùzuDB (default on Windows):** Runs natively on Windows, macOS, and Linux. On Windows it is the usual embedded choice; `pip install kuzu` if needed.
328
+ - **FalkorDB Lite (typical default on Unix):** When Python 3.12+ and `falkordblite` are available on Unix/macOS/WSL, the embedded backend prefers FalkorDB Lite; otherwise KùzuDB is used.
329
+ - **Neo4j (Alternative):** To use Neo4j instead, or if you prefer a server-based approach, run: `cgc neo4j setup`
330
+
331
+ ---
332
+
333
+ ### For CLI Toolkit Mode
334
+
335
+ **Start using immediately with CLI commands:**
336
+ ```bash
337
+ # Index your current directory
338
+ cgc index .
339
+
340
+ # List all indexed repositories
341
+ cgc list
342
+
343
+ # Analyze who calls a function
344
+ cgc analyze callers my_function
345
+
346
+ # Find complex code
347
+ cgc analyze complexity --threshold 10
348
+
349
+ # Find dead code
350
+ cgc analyze dead-code
351
+
352
+ # Watch for live changes (optional)
353
+ cgc watch .
354
+
355
+ # See all commands
356
+ cgc help
357
+ ```
358
+
359
+ **See the full [CLI Commands Guide](docs/CLI_COMPLETE_REFERENCE.md) for all available commands and usage scenarios.**
360
+
361
+ ### 🎨 Premium Interactive Visualization
362
+ CodeGraphContext can generate stunning, interactive knowledge graphs of your code. Unlike static diagrams, these are premium web-based explorers:
363
+
364
+ - **Premium Aesthetics**: Dark mode, glassmorphism, and modern typography (Outfit/JetBrains Mono).
365
+ - **Interactive Inspection**: Click any node to open a detailed side panel with symbol information, file paths, and context.
366
+ - **Quick Search**: Live-search through the graph to find specific symbols instantly.
367
+ - **Intelligent Layouts**: Force-directed and hierarchical layouts that make complex relationships readable.
368
+ - **Zero-Dependency Viewing**: Standalone HTML files that work in any modern browser.
369
+
370
+ ```bash
371
+ # Visualize function calls
372
+ cgc analyze calls my_function --viz
373
+
374
+ # Explore class hierarchies
375
+ cgc analyze tree MyClass --viz
376
+
377
+ # Visualize search results
378
+ cgc find pattern "Auth" --viz
379
+ ```
380
+
381
+
382
+ ---
383
+
384
+ ### 🤖 For MCP Server Mode
385
+
386
+ **Configure your AI assistant to use CodeGraphContext:**
387
+ 1. **Setup:** Run the MCP setup wizard to configure your IDE/AI assistant:
388
+
389
+ ```bash
390
+ cgc mcp setup
391
+ ```
392
+
393
+ The wizard can automatically detect and configure:
394
+ * VS Code
395
+ * Cursor
396
+ * Windsurf
397
+ * Claude
398
+ * Gemini CLI
399
+ * ChatGPT Codex
400
+ * Cline
401
+ * RooCode
402
+ * Amazon Q Developer
403
+ * Kiro
404
+
405
+ Upon successful configuration, `cgc mcp setup` will generate and place the necessary configuration files:
406
+ * It creates an `mcp.json` file in your current directory for reference.
407
+ * It stores your database credentials securely in `~/.codegraphcontext/.env`.
408
+ * It updates the settings file of your chosen IDE/CLI (e.g., `.claude.json` or VS Code's `settings.json`).
409
+
410
+ 2. **Start:** Launch the MCP server:
411
+ ```bash
412
+ cgc mcp start
413
+ ```
414
+
415
+ 3. **Use:** Now interact with your codebase through your AI assistant using natural language! See examples below.
416
+
417
+ ---
418
+
419
+ ## Ignoring Files (`.cgcignore`)
420
+
421
+ You can tell CodeGraphContext to ignore specific files and directories by creating a `.cgcignore` file in the root of your project. This file uses the same syntax as `.gitignore`.
422
+
423
+ **Example `.cgcignore` file:**
424
+ ```
425
+ # Ignore build artifacts
426
+ /build/
427
+ /dist/
428
+
429
+ # Ignore dependencies
430
+ /node_modules/
431
+ /vendor/
432
+
433
+ # Ignore logs
434
+ *.log
435
+ ```
436
+
437
+ ---
438
+
439
+ ## MCP Client Configuration
440
+
441
+ The `cgc mcp setup` command attempts to automatically configure your IDE/CLI. If you choose not to use the automatic setup, or if your tool is not supported, you can configure it manually.
442
+
443
+ Add the following server configuration to your client's settings file (e.g., VS Code's `settings.json` or `.claude.json`):
444
+
445
+ ```json
446
+ {
447
+ "mcpServers": {
448
+ "CodeGraphContext": {
449
+ "command": "cgc",
450
+ "args": [
451
+ "mcp",
452
+ "start"
453
+ ],
454
+ "env": {
455
+ "NEO4J_URI": "YOUR_NEO4J_URI",
456
+ "NEO4J_USERNAME": "YOUR_NEO4J_USERNAME",
457
+ "NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
458
+ },
459
+ "disabled": false,
460
+ "alwaysAllow": []
461
+ }
462
+ }
463
+ }
464
+ ```
465
+
466
+ ---
467
+
468
+ ## Natural Language Interaction Examples
469
+
470
+ Once the server is running, you can interact with it through your AI assistant using plain English. Here are some examples of what you can say:
471
+
472
+ ### Indexing and Watching Files
473
+
474
+ - **To index a new project:**
475
+ - "Please index the code in the `/path/to/my-project` directory."
476
+ OR
477
+ - "Add the project at `~/dev/my-other-project` to the code graph."
478
+
479
+
480
+ - **To start watching a directory for live changes:**
481
+ - "Watch the `/path/to/my-active-project` directory for changes."
482
+ OR
483
+ - "Keep the code graph updated for the project I'm working on at `~/dev/main-app`."
484
+
485
+ When you ask to watch a directory, the system performs two actions at once:
486
+ 1. It kicks off a full scan to index all the code in that directory. This process runs in the background, and you'll receive a `job_id` to track its progress.
487
+ 2. It begins watching the directory for any file changes to keep the graph updated in real-time.
488
+
489
+ This means you can start by simply telling the system to watch a directory, and it will handle both the initial indexing and the continuous updates automatically.
490
+
491
+ ### Querying and Understanding Code
492
+
493
+ - **Finding where code is defined:**
494
+ - "Where is the `process_payment` function?"
495
+ - "Find the `User` class for me."
496
+ - "Show me any code related to 'database connection'."
497
+
498
+ - **Analyzing relationships and impact:**
499
+ - "What other functions call the `get_user_by_id` function?"
500
+ - "If I change the `calculate_tax` function, what other parts of the code will be affected?"
501
+ - "Show me the inheritance hierarchy for the `BaseController` class."
502
+ - "What methods does the `Order` class have?"
503
+
504
+ - **Exploring dependencies:**
505
+ - "Which files import the `requests` library?"
506
+ - "Find all implementations of the `render` method."
507
+
508
+ - **Advanced Call Chain and Dependency Tracking (Spanning Hundreds of Files):**
509
+ The CodeGraphContext excels at tracing complex execution flows and dependencies across vast codebases. Leveraging the power of graph databases, it can identify direct and indirect callers and callees, even when a function is called through multiple layers of abstraction or across numerous files. This is invaluable for:
510
+ - **Impact Analysis:** Understand the full ripple effect of a change to a core function.
511
+ - **Debugging:** Trace the path of execution from an entry point to a specific bug.
512
+ - **Code Comprehension:** Grasp how different parts of a large system interact.
513
+
514
+ - "Show me the full call chain from the `main` function to `process_data`."
515
+ - "Find all functions that directly or indirectly call `validate_input`."
516
+ - "What are all the functions that `initialize_system` eventually calls?"
517
+ - "Trace the dependencies of the `DatabaseManager` module."
518
+
519
+ - **Code Quality and Maintenance:**
520
+ - "Is there any dead or unused code in this project?"
521
+ - "Calculate the cyclomatic complexity of the `process_data` function in `src/utils.py`."
522
+ - "Find the 5 most complex functions in the codebase."
523
+
524
+ - **Repository Management:**
525
+ - "List all currently indexed repositories."
526
+ - "Delete the indexed repository at `/path/to/old-project`."
527
+
528
+ ---
529
+
530
+ ## Contributing
531
+
532
+ Contributions are welcome! 🎉
533
+ Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
534
+ If you have ideas for new features, integrations, or improvements, open an [issue](https://github.com/CodeGraphContext/CodeGraphContext/issues) or submit a Pull Request.
535
+
536
+ Join discussions and help shape the future of CodeGraphContext.
537
+