codegraphcontext 0.4.5__tar.gz → 0.4.6__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.
- {codegraphcontext-0.4.5/src/codegraphcontext.egg-info → codegraphcontext-0.4.6}/PKG-INFO +60 -33
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/README.md +57 -30
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/pyproject.toml +3 -3
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/config_manager.py +33 -3
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/setup_wizard.py +20 -12
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/__init__.py +25 -3
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/cgc_bundle.py +3 -8
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/database_falkordb.py +64 -19
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/database_kuzu.py +31 -2
- codegraphcontext-0.4.6/src/codegraphcontext/core/database_nornic.py +204 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/server.py +116 -3
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/code_finder.py +86 -66
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/graph_builder.py +37 -7
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/handlers/analysis_handlers.py +54 -17
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/handlers/management_handlers.py +14 -3
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/handlers/query_handlers.py +14 -4
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/persistence/writer.py +24 -4
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/pre_scan.py +12 -2
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/resolution/calls.py +51 -1
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/schema.py +3 -3
- codegraphcontext-0.4.6/src/codegraphcontext/tools/languages/css.py +84 -0
- codegraphcontext-0.4.6/src/codegraphcontext/tools/languages/html.py +123 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/java.py +58 -29
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/javascript.py +38 -0
- codegraphcontext-0.4.6/src/codegraphcontext/tools/languages/lua.py +410 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/php.py +26 -18
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/swift.py +51 -4
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/typescript.py +1 -1
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/tree_sitter_parser.py +12 -0
- codegraphcontext-0.4.6/src/codegraphcontext/utils/git_utils.py +25 -0
- codegraphcontext-0.4.6/src/codegraphcontext/utils/tool_limits.py +85 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/utils/tree_sitter_manager.py +3 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6/src/codegraphcontext.egg-info}/PKG-INFO +60 -33
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext.egg-info/SOURCES.txt +8 -1
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext.egg-info/requires.txt +2 -2
- codegraphcontext-0.4.6/tests/test_issue_806_fix.py +554 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/LICENSE +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/MANIFEST.in +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/setup.cfg +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/__init__.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/__main__.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/__init__.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/cli_helpers.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/main.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/registry_commands.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/setup_macos.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/visualizer.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/bundle_registry.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/cgcignore.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/database.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/falkor_worker.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/jobs.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/core/watcher.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/prompts.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tool_definitions.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/__init__.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/constants.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/pipeline.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/indexing/scip_pipeline.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/c.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/cpp.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/csharp.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/dart.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/elixir.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/go.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/haskell.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/perl.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/python.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/ruby.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/rust.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/scala.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/package_resolver.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/scip_indexer.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/scip_pb2.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/tools/system.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/utils/debug_log.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/utils/path_ignore.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/utils/repo_path.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/utils/visualize_graph.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/index-BJT3EMmQ.js +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/index-DjDPHWki.css +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/parser.worker-CZgm11E5.js +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/index.html +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/robots.txt +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/viz/server.py +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
- {codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraphcontext
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.6
|
|
4
4
|
Summary: An MCP server that indexes local code into a graph database to provide context to AI assistants.
|
|
5
5
|
Author-email: Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -44,7 +44,7 @@ Requires-Dist: rich>=13.7.0
|
|
|
44
44
|
Requires-Dist: inquirerpy>=0.3.4
|
|
45
45
|
Requires-Dist: python-dotenv>=1.0.0
|
|
46
46
|
Requires-Dist: tree-sitter>=0.21.0; python_version != "3.13"
|
|
47
|
-
Requires-Dist: tree-sitter-language-pack
|
|
47
|
+
Requires-Dist: tree-sitter-language-pack!=1.6.3,>=0.6.0; python_version != "3.13"
|
|
48
48
|
Requires-Dist: tree-sitter-c-sharp>=0.21.0; python_version != "3.13"
|
|
49
49
|
Requires-Dist: pyyaml
|
|
50
50
|
Requires-Dist: nbformat
|
|
@@ -59,7 +59,7 @@ Requires-Dist: fastapi>=0.100.0
|
|
|
59
59
|
Requires-Dist: uvicorn>=0.22.0
|
|
60
60
|
Provides-Extra: parsing
|
|
61
61
|
Requires-Dist: tree-sitter>=0.21.0; python_version != "3.13" and extra == "parsing"
|
|
62
|
-
Requires-Dist: tree-sitter-language-pack
|
|
62
|
+
Requires-Dist: tree-sitter-language-pack!=1.6.3,>=0.6.0; python_version != "3.13" and extra == "parsing"
|
|
63
63
|
Requires-Dist: tree-sitter-c-sharp>=0.21.0; python_version != "3.13" and extra == "parsing"
|
|
64
64
|
Provides-Extra: dev
|
|
65
65
|
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
@@ -166,7 +166,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
166
166
|
---
|
|
167
167
|
|
|
168
168
|
## Project Details
|
|
169
|
-
- **Version:** 0.4.
|
|
169
|
+
- **Version:** 0.4.6
|
|
170
170
|
- **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
|
|
171
171
|
- **License:** MIT License (See [LICENSE](LICENSE) for details)
|
|
172
172
|
- **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
|
|
@@ -195,11 +195,12 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
195
195
|
- **Code Indexing:** Analyzes code and builds a knowledge graph of its components.
|
|
196
196
|
- **Relationship Analysis:** Query for callers, callees, class hierarchies, call chains and more.
|
|
197
197
|
- **Pre-indexed Bundles:** Load famous repositories instantly with `.cgc` bundles - no indexing required! ([Learn more](docs/BUNDLES.md))
|
|
198
|
-
- **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`
|
|
198
|
+
- **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`codegraphcontext watch`).
|
|
199
199
|
- **Interactive Setup:** A user-friendly command-line wizard for easy setup.
|
|
200
200
|
- **Dual Mode:** Works as a standalone **CLI toolkit** for developers and as an **MCP server** for AI agents.
|
|
201
|
-
- **Multi-Language Support:** Full support for
|
|
202
|
-
- **Flexible Database Backend:**
|
|
201
|
+
- **Multi-Language Support:** Full support for 15 programming languages.
|
|
202
|
+
- **Flexible Database Backend:** LadybugDB (Default), FalkorDB Lite (Typical Unix default), FalkorDB Remote, Nornic DB, or Neo4j (all platforms via Docker/native).
|
|
203
|
+
|
|
203
204
|
|
|
204
205
|
---
|
|
205
206
|
|
|
@@ -213,7 +214,7 @@ CodeGraphContext provides comprehensive parsing and analysis for the following l
|
|
|
213
214
|
| ☕ | **Java** | 🏗️ | **C / C++** | #️⃣ | **C#** |
|
|
214
215
|
| 🐹 | **Go** | 🦀 | **Rust** | 💎 | **Ruby** |
|
|
215
216
|
| 🐘 | **PHP** | 🍎 | **Swift** | 🎨 | **Kotlin** |
|
|
216
|
-
| 🎯 | **Dart** | 🐪 | **Perl** | | |
|
|
217
|
+
| 🎯 | **Dart** | 🐪 | **Perl** | 🌙 | **Lua** |
|
|
217
218
|
|
|
218
219
|
Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
|
|
219
220
|
|
|
@@ -223,13 +224,13 @@ Each language parser extracts functions, classes, methods, parameters, inheritan
|
|
|
223
224
|
|
|
224
225
|
CodeGraphContext supports multiple graph database backends to suit your environment:
|
|
225
226
|
|
|
226
|
-
| Feature |
|
|
227
|
+
| Feature | LadybugDB | FalkorDB Lite | Neo4j / Nornic DB |
|
|
227
228
|
| :--- | :--- | :--- | :--- |
|
|
228
|
-
| **Typical default** | **
|
|
229
|
+
| **Typical default** | **Standard Default** (embedded, when `real_ladybug` is installed) | **Unix** (Python 3.12+, when `falkordblite` works) | When explicitly configured |
|
|
229
230
|
| **Setup** | Zero-config / Embedded | Zero-config / In-process | Docker / External |
|
|
230
231
|
| **Platform** | **All (Windows Native, macOS, Linux)** | Unix-only (Linux/macOS/WSL) | All Platforms |
|
|
231
232
|
| **Use Case** | Desktop, IDE, Local development | Specialized Unix development | Enterprise, Massive graphs |
|
|
232
|
-
| **Requirement**| `pip install real_ladybug` | `pip install falkordblite` | Neo4j Server / Docker |
|
|
233
|
+
| **Requirement**| `pip install real_ladybug` | `pip install falkordblite` | Neo4j Server / Docker / Nornic Cloud |
|
|
233
234
|
| **Speed** | ⚡ Extremely Fast | ⚡ Fast | 🚀 Scalable |
|
|
234
235
|
| **Persistence**| Yes (to disk) | Yes (to disk) | Yes (to disk) |
|
|
235
236
|
|
|
@@ -274,7 +275,7 @@ _If you’re using CodeGraphContext in your project, feel free to open a PR and
|
|
|
274
275
|
pip install codegraphcontext
|
|
275
276
|
```
|
|
276
277
|
|
|
277
|
-
### If '
|
|
278
|
+
### If 'codegraphcontext' command isn't found, run our one-line fix:
|
|
278
279
|
```
|
|
279
280
|
curl -sSL https://raw.githubusercontent.com/CodeGraphContext/CodeGraphContext/main/scripts/post_install_fix.sh | bash
|
|
280
281
|
```
|
|
@@ -306,9 +307,9 @@ Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
|
306
307
|
|
|
307
308
|
1. **Install:** `pip install codegraphcontext`
|
|
308
309
|
<details>
|
|
309
|
-
<summary>⚙️ Troubleshooting: In case, command <code>
|
|
310
|
-
|
|
311
|
-
If you encounter <i>"
|
|
310
|
+
<summary>⚙️ Troubleshooting: In case, command <code>codegraphcontext</code> not found</summary>
|
|
311
|
+
<br>
|
|
312
|
+
If you encounter <i>"codegraphcontext: command not found"</i> after installation, run the PATH fix script:
|
|
312
313
|
|
|
313
314
|
**Linux/Mac:**
|
|
314
315
|
```bash
|
|
@@ -340,9 +341,9 @@ Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
|
340
341
|
|
|
341
342
|
2. **Database Setup (Automatic)**
|
|
342
343
|
|
|
343
|
-
- **
|
|
344
|
-
- **FalkorDB Lite (
|
|
345
|
-
- **Neo4j (Alternative):** To use Neo4j instead, or if you prefer a server-based approach, run: `
|
|
344
|
+
- **LadybugDB (Default):** Runs natively on Windows, macOS, and Linux. It is the primary embedded choice; `pip install real_ladybug` if needed.
|
|
345
|
+
- **FalkorDB Lite (High Performance Unix):** When Python 3.12+ and `falkordblite` are available on Unix/macOS/WSL, the embedded backend prefers FalkorDB Lite for speed; otherwise LadybugDB is used.
|
|
346
|
+
- **Neo4j (Alternative):** To use Neo4j instead, or if you prefer a server-based approach, run: `codegraphcontext neo4j setup`
|
|
346
347
|
|
|
347
348
|
---
|
|
348
349
|
|
|
@@ -351,25 +352,25 @@ Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
|
351
352
|
**Start using immediately with CLI commands:**
|
|
352
353
|
```bash
|
|
353
354
|
# Index your current directory
|
|
354
|
-
|
|
355
|
+
codegraphcontext index .
|
|
355
356
|
|
|
356
357
|
# List all indexed repositories
|
|
357
|
-
|
|
358
|
+
codegraphcontext list
|
|
358
359
|
|
|
359
360
|
# Analyze who calls a function
|
|
360
|
-
|
|
361
|
+
codegraphcontext analyze callers my_function
|
|
361
362
|
|
|
362
363
|
# Find complex code
|
|
363
|
-
|
|
364
|
+
codegraphcontext analyze complexity --threshold 10
|
|
364
365
|
|
|
365
366
|
# Find dead code
|
|
366
|
-
|
|
367
|
+
codegraphcontext analyze dead-code
|
|
367
368
|
|
|
368
369
|
# Watch for live changes (optional)
|
|
369
|
-
|
|
370
|
+
codegraphcontext watch .
|
|
370
371
|
|
|
371
372
|
# See all commands
|
|
372
|
-
|
|
373
|
+
codegraphcontext help
|
|
373
374
|
```
|
|
374
375
|
|
|
375
376
|
**See the full [CLI Commands Guide](docs/CLI_COMPLETE_REFERENCE.md) for all available commands and usage scenarios.**
|
|
@@ -385,13 +386,13 @@ CodeGraphContext can generate stunning, interactive knowledge graphs of your cod
|
|
|
385
386
|
|
|
386
387
|
```bash
|
|
387
388
|
# Visualize function calls
|
|
388
|
-
|
|
389
|
+
codegraphcontext analyze calls my_function --viz
|
|
389
390
|
|
|
390
391
|
# Explore class hierarchies
|
|
391
|
-
|
|
392
|
+
codegraphcontext analyze tree MyClass --viz
|
|
392
393
|
|
|
393
394
|
# Visualize search results
|
|
394
|
-
|
|
395
|
+
codegraphcontext find pattern "Auth" --viz
|
|
395
396
|
```
|
|
396
397
|
|
|
397
398
|
|
|
@@ -403,7 +404,7 @@ cgc find pattern "Auth" --viz
|
|
|
403
404
|
1. **Setup:** Run the MCP setup wizard to configure your IDE/AI assistant:
|
|
404
405
|
|
|
405
406
|
```bash
|
|
406
|
-
|
|
407
|
+
codegraphcontext mcp setup
|
|
407
408
|
```
|
|
408
409
|
|
|
409
410
|
The wizard can automatically detect and configure:
|
|
@@ -418,14 +419,14 @@ cgc find pattern "Auth" --viz
|
|
|
418
419
|
* Amazon Q Developer
|
|
419
420
|
* Kiro
|
|
420
421
|
|
|
421
|
-
Upon successful configuration, `
|
|
422
|
+
Upon successful configuration, `codegraphcontext mcp setup` will generate and place the necessary configuration files:
|
|
422
423
|
* It creates an `mcp.json` file in your current directory for reference.
|
|
423
424
|
* It stores your database credentials securely in `~/.codegraphcontext/.env`.
|
|
424
425
|
* It updates the settings file of your chosen IDE/CLI (e.g., `.claude.json` or VS Code's `settings.json`).
|
|
425
426
|
|
|
426
427
|
2. **Start:** Launch the MCP server:
|
|
427
428
|
```bash
|
|
428
|
-
|
|
429
|
+
codegraphcontext mcp start
|
|
429
430
|
```
|
|
430
431
|
|
|
431
432
|
3. **Use:** Now interact with your codebase through your AI assistant using natural language! See examples below.
|
|
@@ -454,7 +455,7 @@ You can tell CodeGraphContext to ignore specific files and directories by creati
|
|
|
454
455
|
|
|
455
456
|
## MCP Client Configuration
|
|
456
457
|
|
|
457
|
-
The `
|
|
458
|
+
The `codegraphcontext 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.
|
|
458
459
|
|
|
459
460
|
Add the following server configuration to your client's settings file (e.g., VS Code's `settings.json` or `.claude.json`):
|
|
460
461
|
|
|
@@ -462,8 +463,34 @@ Add the following server configuration to your client's settings file (e.g., VS
|
|
|
462
463
|
{
|
|
463
464
|
"mcpServers": {
|
|
464
465
|
"CodeGraphContext": {
|
|
465
|
-
"command": "
|
|
466
|
+
"command": "codegraphcontext",
|
|
467
|
+
"args": [
|
|
468
|
+
"mcp",
|
|
469
|
+
"start"
|
|
470
|
+
],
|
|
471
|
+
"env": {
|
|
472
|
+
"NEO4J_URI": "YOUR_NEO4J_URI",
|
|
473
|
+
"NEO4J_USERNAME": "YOUR_NEO4J_USERNAME",
|
|
474
|
+
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
|
|
475
|
+
},
|
|
476
|
+
"disabled": false,
|
|
477
|
+
"alwaysAllow": []
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
#### If installed via pipx
|
|
484
|
+
|
|
485
|
+
If you installed CodeGraphContext using `pipx`, use the following configuration instead:
|
|
486
|
+
```json
|
|
487
|
+
{
|
|
488
|
+
"mcpServers": {
|
|
489
|
+
"CodeGraphContext": {
|
|
490
|
+
"command": "pipx",
|
|
466
491
|
"args": [
|
|
492
|
+
"run",
|
|
493
|
+
"codegraphcontext",
|
|
467
494
|
"mcp",
|
|
468
495
|
"start"
|
|
469
496
|
],
|
|
@@ -97,7 +97,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
97
97
|
---
|
|
98
98
|
|
|
99
99
|
## Project Details
|
|
100
|
-
- **Version:** 0.4.
|
|
100
|
+
- **Version:** 0.4.6
|
|
101
101
|
- **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
|
|
102
102
|
- **License:** MIT License (See [LICENSE](LICENSE) for details)
|
|
103
103
|
- **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
|
|
@@ -126,11 +126,12 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
126
126
|
- **Code Indexing:** Analyzes code and builds a knowledge graph of its components.
|
|
127
127
|
- **Relationship Analysis:** Query for callers, callees, class hierarchies, call chains and more.
|
|
128
128
|
- **Pre-indexed Bundles:** Load famous repositories instantly with `.cgc` bundles - no indexing required! ([Learn more](docs/BUNDLES.md))
|
|
129
|
-
- **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`
|
|
129
|
+
- **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`codegraphcontext watch`).
|
|
130
130
|
- **Interactive Setup:** A user-friendly command-line wizard for easy setup.
|
|
131
131
|
- **Dual Mode:** Works as a standalone **CLI toolkit** for developers and as an **MCP server** for AI agents.
|
|
132
|
-
- **Multi-Language Support:** Full support for
|
|
133
|
-
- **Flexible Database Backend:**
|
|
132
|
+
- **Multi-Language Support:** Full support for 15 programming languages.
|
|
133
|
+
- **Flexible Database Backend:** LadybugDB (Default), FalkorDB Lite (Typical Unix default), FalkorDB Remote, Nornic DB, or Neo4j (all platforms via Docker/native).
|
|
134
|
+
|
|
134
135
|
|
|
135
136
|
---
|
|
136
137
|
|
|
@@ -144,7 +145,7 @@ CodeGraphContext provides comprehensive parsing and analysis for the following l
|
|
|
144
145
|
| ☕ | **Java** | 🏗️ | **C / C++** | #️⃣ | **C#** |
|
|
145
146
|
| 🐹 | **Go** | 🦀 | **Rust** | 💎 | **Ruby** |
|
|
146
147
|
| 🐘 | **PHP** | 🍎 | **Swift** | 🎨 | **Kotlin** |
|
|
147
|
-
| 🎯 | **Dart** | 🐪 | **Perl** | | |
|
|
148
|
+
| 🎯 | **Dart** | 🐪 | **Perl** | 🌙 | **Lua** |
|
|
148
149
|
|
|
149
150
|
Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
|
|
150
151
|
|
|
@@ -154,13 +155,13 @@ Each language parser extracts functions, classes, methods, parameters, inheritan
|
|
|
154
155
|
|
|
155
156
|
CodeGraphContext supports multiple graph database backends to suit your environment:
|
|
156
157
|
|
|
157
|
-
| Feature |
|
|
158
|
+
| Feature | LadybugDB | FalkorDB Lite | Neo4j / Nornic DB |
|
|
158
159
|
| :--- | :--- | :--- | :--- |
|
|
159
|
-
| **Typical default** | **
|
|
160
|
+
| **Typical default** | **Standard Default** (embedded, when `real_ladybug` is installed) | **Unix** (Python 3.12+, when `falkordblite` works) | When explicitly configured |
|
|
160
161
|
| **Setup** | Zero-config / Embedded | Zero-config / In-process | Docker / External |
|
|
161
162
|
| **Platform** | **All (Windows Native, macOS, Linux)** | Unix-only (Linux/macOS/WSL) | All Platforms |
|
|
162
163
|
| **Use Case** | Desktop, IDE, Local development | Specialized Unix development | Enterprise, Massive graphs |
|
|
163
|
-
| **Requirement**| `pip install real_ladybug` | `pip install falkordblite` | Neo4j Server / Docker |
|
|
164
|
+
| **Requirement**| `pip install real_ladybug` | `pip install falkordblite` | Neo4j Server / Docker / Nornic Cloud |
|
|
164
165
|
| **Speed** | ⚡ Extremely Fast | ⚡ Fast | 🚀 Scalable |
|
|
165
166
|
| **Persistence**| Yes (to disk) | Yes (to disk) | Yes (to disk) |
|
|
166
167
|
|
|
@@ -205,7 +206,7 @@ _If you’re using CodeGraphContext in your project, feel free to open a PR and
|
|
|
205
206
|
pip install codegraphcontext
|
|
206
207
|
```
|
|
207
208
|
|
|
208
|
-
### If '
|
|
209
|
+
### If 'codegraphcontext' command isn't found, run our one-line fix:
|
|
209
210
|
```
|
|
210
211
|
curl -sSL https://raw.githubusercontent.com/CodeGraphContext/CodeGraphContext/main/scripts/post_install_fix.sh | bash
|
|
211
212
|
```
|
|
@@ -237,9 +238,9 @@ Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
|
237
238
|
|
|
238
239
|
1. **Install:** `pip install codegraphcontext`
|
|
239
240
|
<details>
|
|
240
|
-
<summary>⚙️ Troubleshooting: In case, command <code>
|
|
241
|
-
|
|
242
|
-
If you encounter <i>"
|
|
241
|
+
<summary>⚙️ Troubleshooting: In case, command <code>codegraphcontext</code> not found</summary>
|
|
242
|
+
<br>
|
|
243
|
+
If you encounter <i>"codegraphcontext: command not found"</i> after installation, run the PATH fix script:
|
|
243
244
|
|
|
244
245
|
**Linux/Mac:**
|
|
245
246
|
```bash
|
|
@@ -271,9 +272,9 @@ Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
|
271
272
|
|
|
272
273
|
2. **Database Setup (Automatic)**
|
|
273
274
|
|
|
274
|
-
- **
|
|
275
|
-
- **FalkorDB Lite (
|
|
276
|
-
- **Neo4j (Alternative):** To use Neo4j instead, or if you prefer a server-based approach, run: `
|
|
275
|
+
- **LadybugDB (Default):** Runs natively on Windows, macOS, and Linux. It is the primary embedded choice; `pip install real_ladybug` if needed.
|
|
276
|
+
- **FalkorDB Lite (High Performance Unix):** When Python 3.12+ and `falkordblite` are available on Unix/macOS/WSL, the embedded backend prefers FalkorDB Lite for speed; otherwise LadybugDB is used.
|
|
277
|
+
- **Neo4j (Alternative):** To use Neo4j instead, or if you prefer a server-based approach, run: `codegraphcontext neo4j setup`
|
|
277
278
|
|
|
278
279
|
---
|
|
279
280
|
|
|
@@ -282,25 +283,25 @@ Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
|
282
283
|
**Start using immediately with CLI commands:**
|
|
283
284
|
```bash
|
|
284
285
|
# Index your current directory
|
|
285
|
-
|
|
286
|
+
codegraphcontext index .
|
|
286
287
|
|
|
287
288
|
# List all indexed repositories
|
|
288
|
-
|
|
289
|
+
codegraphcontext list
|
|
289
290
|
|
|
290
291
|
# Analyze who calls a function
|
|
291
|
-
|
|
292
|
+
codegraphcontext analyze callers my_function
|
|
292
293
|
|
|
293
294
|
# Find complex code
|
|
294
|
-
|
|
295
|
+
codegraphcontext analyze complexity --threshold 10
|
|
295
296
|
|
|
296
297
|
# Find dead code
|
|
297
|
-
|
|
298
|
+
codegraphcontext analyze dead-code
|
|
298
299
|
|
|
299
300
|
# Watch for live changes (optional)
|
|
300
|
-
|
|
301
|
+
codegraphcontext watch .
|
|
301
302
|
|
|
302
303
|
# See all commands
|
|
303
|
-
|
|
304
|
+
codegraphcontext help
|
|
304
305
|
```
|
|
305
306
|
|
|
306
307
|
**See the full [CLI Commands Guide](docs/CLI_COMPLETE_REFERENCE.md) for all available commands and usage scenarios.**
|
|
@@ -316,13 +317,13 @@ CodeGraphContext can generate stunning, interactive knowledge graphs of your cod
|
|
|
316
317
|
|
|
317
318
|
```bash
|
|
318
319
|
# Visualize function calls
|
|
319
|
-
|
|
320
|
+
codegraphcontext analyze calls my_function --viz
|
|
320
321
|
|
|
321
322
|
# Explore class hierarchies
|
|
322
|
-
|
|
323
|
+
codegraphcontext analyze tree MyClass --viz
|
|
323
324
|
|
|
324
325
|
# Visualize search results
|
|
325
|
-
|
|
326
|
+
codegraphcontext find pattern "Auth" --viz
|
|
326
327
|
```
|
|
327
328
|
|
|
328
329
|
|
|
@@ -334,7 +335,7 @@ cgc find pattern "Auth" --viz
|
|
|
334
335
|
1. **Setup:** Run the MCP setup wizard to configure your IDE/AI assistant:
|
|
335
336
|
|
|
336
337
|
```bash
|
|
337
|
-
|
|
338
|
+
codegraphcontext mcp setup
|
|
338
339
|
```
|
|
339
340
|
|
|
340
341
|
The wizard can automatically detect and configure:
|
|
@@ -349,14 +350,14 @@ cgc find pattern "Auth" --viz
|
|
|
349
350
|
* Amazon Q Developer
|
|
350
351
|
* Kiro
|
|
351
352
|
|
|
352
|
-
Upon successful configuration, `
|
|
353
|
+
Upon successful configuration, `codegraphcontext mcp setup` will generate and place the necessary configuration files:
|
|
353
354
|
* It creates an `mcp.json` file in your current directory for reference.
|
|
354
355
|
* It stores your database credentials securely in `~/.codegraphcontext/.env`.
|
|
355
356
|
* It updates the settings file of your chosen IDE/CLI (e.g., `.claude.json` or VS Code's `settings.json`).
|
|
356
357
|
|
|
357
358
|
2. **Start:** Launch the MCP server:
|
|
358
359
|
```bash
|
|
359
|
-
|
|
360
|
+
codegraphcontext mcp start
|
|
360
361
|
```
|
|
361
362
|
|
|
362
363
|
3. **Use:** Now interact with your codebase through your AI assistant using natural language! See examples below.
|
|
@@ -385,7 +386,7 @@ You can tell CodeGraphContext to ignore specific files and directories by creati
|
|
|
385
386
|
|
|
386
387
|
## MCP Client Configuration
|
|
387
388
|
|
|
388
|
-
The `
|
|
389
|
+
The `codegraphcontext 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.
|
|
389
390
|
|
|
390
391
|
Add the following server configuration to your client's settings file (e.g., VS Code's `settings.json` or `.claude.json`):
|
|
391
392
|
|
|
@@ -393,8 +394,34 @@ Add the following server configuration to your client's settings file (e.g., VS
|
|
|
393
394
|
{
|
|
394
395
|
"mcpServers": {
|
|
395
396
|
"CodeGraphContext": {
|
|
396
|
-
"command": "
|
|
397
|
+
"command": "codegraphcontext",
|
|
398
|
+
"args": [
|
|
399
|
+
"mcp",
|
|
400
|
+
"start"
|
|
401
|
+
],
|
|
402
|
+
"env": {
|
|
403
|
+
"NEO4J_URI": "YOUR_NEO4J_URI",
|
|
404
|
+
"NEO4J_USERNAME": "YOUR_NEO4J_USERNAME",
|
|
405
|
+
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
|
|
406
|
+
},
|
|
407
|
+
"disabled": false,
|
|
408
|
+
"alwaysAllow": []
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
#### If installed via pipx
|
|
415
|
+
|
|
416
|
+
If you installed CodeGraphContext using `pipx`, use the following configuration instead:
|
|
417
|
+
```json
|
|
418
|
+
{
|
|
419
|
+
"mcpServers": {
|
|
420
|
+
"CodeGraphContext": {
|
|
421
|
+
"command": "pipx",
|
|
397
422
|
"args": [
|
|
423
|
+
"run",
|
|
424
|
+
"codegraphcontext",
|
|
398
425
|
"mcp",
|
|
399
426
|
"start"
|
|
400
427
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codegraphcontext"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.6"
|
|
4
4
|
description = "An MCP server that indexes local code into a graph database to provide context to AI assistants."
|
|
5
5
|
authors = [{ name = "Shashank Shekhar Singh", email = "shashankshekharsingh1205@gmail.com" }]
|
|
6
6
|
readme = "README.md"
|
|
@@ -23,7 +23,7 @@ dependencies = [
|
|
|
23
23
|
"inquirerpy>=0.3.4",
|
|
24
24
|
"python-dotenv>=1.0.0",
|
|
25
25
|
"tree-sitter>=0.21.0; python_version != '3.13'",
|
|
26
|
-
"tree-sitter-language-pack>=0.6.0; python_version != '3.13'",
|
|
26
|
+
"tree-sitter-language-pack>=0.6.0,!=1.6.3; python_version != '3.13'",
|
|
27
27
|
"tree-sitter-c-sharp>=0.21.0; python_version != '3.13'",
|
|
28
28
|
"pyyaml",
|
|
29
29
|
"nbformat",
|
|
@@ -41,7 +41,7 @@ dependencies = [
|
|
|
41
41
|
[project.optional-dependencies]
|
|
42
42
|
parsing = [
|
|
43
43
|
"tree-sitter>=0.21.0; python_version != '3.13'",
|
|
44
|
-
"tree-sitter-language-pack>=0.6.0; python_version != '3.13'",
|
|
44
|
+
"tree-sitter-language-pack>=0.6.0,!=1.6.3; python_version != '3.13'",
|
|
45
45
|
"tree-sitter-c-sharp>=0.21.0; python_version != '3.13'",
|
|
46
46
|
]
|
|
47
47
|
dev = [
|
{codegraphcontext-0.4.5 → codegraphcontext-0.4.6}/src/codegraphcontext/cli/config_manager.py
RENAMED
|
@@ -19,7 +19,10 @@ CONFIG_DIR = Path.home() / ".codegraphcontext"
|
|
|
19
19
|
CONFIG_FILE = CONFIG_DIR / ".env"
|
|
20
20
|
|
|
21
21
|
# Database credential keys (stored in same .env file but not managed as config)
|
|
22
|
-
DATABASE_CREDENTIAL_KEYS = {
|
|
22
|
+
DATABASE_CREDENTIAL_KEYS = {
|
|
23
|
+
"NEO4J_URI", "NEO4J_USERNAME", "NEO4J_PASSWORD", "NEO4J_DATABASE",
|
|
24
|
+
"NORNIC_URI", "NORNIC_USERNAME", "NORNIC_PASSWORD", "NORNIC_DATABASE"
|
|
25
|
+
}
|
|
23
26
|
|
|
24
27
|
# Default configuration values
|
|
25
28
|
DEFAULT_CONFIG = {
|
|
@@ -47,11 +50,16 @@ DEFAULT_CONFIG = {
|
|
|
47
50
|
"SCIP_INDEXER": "false",
|
|
48
51
|
"SCIP_LANGUAGES": "python,typescript,go,rust,java",
|
|
49
52
|
"SKIP_EXTERNAL_RESOLUTION": "false",
|
|
53
|
+
# 0 = unlimited; any positive integer caps MCP tool response size.
|
|
54
|
+
"MAX_TOOL_RESPONSE_TOKENS": "0",
|
|
55
|
+
# JSON object mapping tool names to integer result-count limits.
|
|
56
|
+
# Example: {"find_code": 20, "analyze_code_relationships": 10, "find_dead_code": 30}
|
|
57
|
+
"TOOL_RESULT_LIMITS": "{}",
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
# Configuration key descriptions
|
|
53
61
|
CONFIG_DESCRIPTIONS = {
|
|
54
|
-
"DEFAULT_DATABASE": "Default database backend (neo4j|falkordb|kuzudb)",
|
|
62
|
+
"DEFAULT_DATABASE": "Default database backend (neo4j|falkordb|kuzudb|nornic)",
|
|
55
63
|
"FALKORDB_PATH": "Path to FalkorDB database file",
|
|
56
64
|
"FALKORDB_SOCKET_PATH": "Path to FalkorDB Unix socket",
|
|
57
65
|
"INDEX_VARIABLES": "Index variable nodes in the graph (lighter graph if false)",
|
|
@@ -74,11 +82,13 @@ CONFIG_DESCRIPTIONS = {
|
|
|
74
82
|
"SCIP_INDEXER": "Use SCIP-based indexing for higher accuracy call/inheritance resolution (requires scip-<lang> tools installed)",
|
|
75
83
|
"SCIP_LANGUAGES": "Comma-separated languages to index via SCIP when SCIP_INDEXER=true (python,typescript,go,rust,java)",
|
|
76
84
|
"SKIP_EXTERNAL_RESOLUTION": "Skip resolution attempts for external library method calls (recommended for enterprise large Java/Spring codebases)",
|
|
85
|
+
"MAX_TOOL_RESPONSE_TOKENS": "Maximum tokens per MCP tool response (0 = unlimited). Truncates oversized payloads and appends a notice.",
|
|
86
|
+
"TOOL_RESULT_LIMITS": "JSON object mapping tool names to max result counts, e.g. {\"find_code\": 20, \"analyze_code_relationships\": 10}. Missing keys use built-in defaults.",
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
# Valid values for each config key
|
|
80
90
|
CONFIG_VALIDATORS = {
|
|
81
|
-
"DEFAULT_DATABASE": ["neo4j", "falkordb", "falkordb-remote", "kuzudb"],
|
|
91
|
+
"DEFAULT_DATABASE": ["neo4j", "falkordb", "falkordb-remote", "kuzudb", "nornic"],
|
|
82
92
|
"INDEX_VARIABLES": ["true", "false"],
|
|
83
93
|
"ALLOW_DB_DELETION": ["true", "false"],
|
|
84
94
|
"DEBUG_LOGS": ["true", "false"],
|
|
@@ -342,6 +352,26 @@ def validate_config_value(key: str, value: str) -> tuple[bool, Optional[str]]:
|
|
|
342
352
|
return False, "PARALLEL_WORKERS must be between 1 and 32"
|
|
343
353
|
except ValueError:
|
|
344
354
|
return False, "PARALLEL_WORKERS must be a number"
|
|
355
|
+
|
|
356
|
+
if key == "MAX_TOOL_RESPONSE_TOKENS":
|
|
357
|
+
try:
|
|
358
|
+
limit = int(value)
|
|
359
|
+
if limit < 0:
|
|
360
|
+
return False, "MAX_TOOL_RESPONSE_TOKENS must be 0 (unlimited) or a positive integer"
|
|
361
|
+
except ValueError:
|
|
362
|
+
return False, "MAX_TOOL_RESPONSE_TOKENS must be an integer (0 = unlimited)"
|
|
363
|
+
|
|
364
|
+
if key == "TOOL_RESULT_LIMITS":
|
|
365
|
+
import json as _json
|
|
366
|
+
try:
|
|
367
|
+
parsed = _json.loads(value)
|
|
368
|
+
if not isinstance(parsed, dict):
|
|
369
|
+
return False, "TOOL_RESULT_LIMITS must be a JSON object, e.g. {\"find_code\": 20}"
|
|
370
|
+
for k, v in parsed.items():
|
|
371
|
+
if not isinstance(v, int) or v < 1:
|
|
372
|
+
return False, f"TOOL_RESULT_LIMITS: value for '{k}' must be a positive integer"
|
|
373
|
+
except _json.JSONDecodeError:
|
|
374
|
+
return False, "TOOL_RESULT_LIMITS must be valid JSON, e.g. {\"find_code\": 20, \"find_dead_code\": 30}"
|
|
345
375
|
|
|
346
376
|
if key == "MAX_DEPTH":
|
|
347
377
|
if value.lower() != "unlimited":
|
|
@@ -54,15 +54,18 @@ def _save_neo4j_credentials(creds):
|
|
|
54
54
|
|
|
55
55
|
def _generate_mcp_json(creds):
|
|
56
56
|
"""Generates and prints the MCP JSON configuration."""
|
|
57
|
-
cgc_path = shutil.which("cgc")
|
|
57
|
+
cgc_path = shutil.which("cgc")
|
|
58
|
+
pipx_path = shutil.which("pipx")
|
|
58
59
|
|
|
59
|
-
if
|
|
60
|
-
# fallback to running as module if no cgc binary is found
|
|
60
|
+
if cgc_path:
|
|
61
61
|
command = cgc_path
|
|
62
|
-
args = ["
|
|
62
|
+
args = ["mcp", "start"]
|
|
63
|
+
elif pipx_path:
|
|
64
|
+
command = pipx_path
|
|
65
|
+
args = ["run", "codegraphcontext", "mcp", "start"]
|
|
63
66
|
else:
|
|
64
|
-
command =
|
|
65
|
-
args = ["mcp","start"]
|
|
67
|
+
command = sys.executable
|
|
68
|
+
args = ["-m", "codegraphcontext", "mcp", "start"]
|
|
66
69
|
|
|
67
70
|
mcp_config = {
|
|
68
71
|
"mcpServers": {
|
|
@@ -84,6 +87,7 @@ def _generate_mcp_json(creds):
|
|
|
84
87
|
"list_indexed_repositories", "delete_repository", "list_watched_paths",
|
|
85
88
|
"unwatch_directory", "visualize_graph_query"
|
|
86
89
|
],
|
|
90
|
+
"disabledTools": [],
|
|
87
91
|
"disabled": False
|
|
88
92
|
},
|
|
89
93
|
"disabled": False,
|
|
@@ -424,15 +428,18 @@ def configure_mcp_client():
|
|
|
424
428
|
env_vars[key] = value
|
|
425
429
|
|
|
426
430
|
# Generate MCP configuration
|
|
427
|
-
cgc_path = shutil.which("cgc")
|
|
431
|
+
cgc_path = shutil.which("cgc")
|
|
432
|
+
pipx_path = shutil.which("pipx")
|
|
428
433
|
|
|
429
|
-
if
|
|
430
|
-
# fallback to running as module if no cgc binary is found
|
|
431
|
-
command = cgc_path
|
|
432
|
-
args = ["-m", "cgc", "mcp", "start"]
|
|
433
|
-
else:
|
|
434
|
+
if cgc_path:
|
|
434
435
|
command = cgc_path
|
|
435
436
|
args = ["mcp", "start"]
|
|
437
|
+
elif pipx_path:
|
|
438
|
+
command = pipx_path
|
|
439
|
+
args = ["run", "codegraphcontext", "mcp", "start"]
|
|
440
|
+
else:
|
|
441
|
+
command = sys.executable
|
|
442
|
+
args = ["-m", "codegraphcontext", "mcp", "start"]
|
|
436
443
|
|
|
437
444
|
# Create MCP config with complete env section
|
|
438
445
|
mcp_config = {
|
|
@@ -451,6 +458,7 @@ def configure_mcp_client():
|
|
|
451
458
|
"list_indexed_repositories", "delete_repository", "list_watched_paths",
|
|
452
459
|
"unwatch_directory", "visualize_graph_query"
|
|
453
460
|
],
|
|
461
|
+
"disabledTools": [],
|
|
454
462
|
"disabled": False
|
|
455
463
|
},
|
|
456
464
|
"disabled": False,
|
|
@@ -52,7 +52,15 @@ def _is_neo4j_configured() -> bool:
|
|
|
52
52
|
os.getenv('NEO4J_PASSWORD')
|
|
53
53
|
])
|
|
54
54
|
|
|
55
|
-
def
|
|
55
|
+
def _is_nornic_configured() -> bool:
|
|
56
|
+
"""Check if Nornic is configured with credentials."""
|
|
57
|
+
return all([
|
|
58
|
+
os.getenv('NORNIC_URI'),
|
|
59
|
+
os.getenv('NORNIC_USERNAME'),
|
|
60
|
+
os.getenv('NORNIC_PASSWORD')
|
|
61
|
+
])
|
|
62
|
+
|
|
63
|
+
def get_database_manager(db_path: Optional[str] = None) -> Union['DatabaseManager', 'FalkorDBManager', 'FalkorDBRemoteManager', 'KuzuDBManager', 'NornicDBManager']:
|
|
56
64
|
"""
|
|
57
65
|
Factory function to get the appropriate database manager based on configuration.
|
|
58
66
|
|
|
@@ -111,8 +119,15 @@ def get_database_manager(db_path: Optional[str] = None) -> Union['DatabaseManage
|
|
|
111
119
|
from .database import DatabaseManager
|
|
112
120
|
info_logger("Using Neo4j Server (explicit)")
|
|
113
121
|
return DatabaseManager()
|
|
122
|
+
|
|
123
|
+
elif db_type == 'nornic':
|
|
124
|
+
if not _is_nornic_configured():
|
|
125
|
+
raise ValueError("Database set to 'nornic' but it is not configured.")
|
|
126
|
+
from .database_nornic import NornicDBManager
|
|
127
|
+
info_logger("Using Nornic DB (explicit)")
|
|
128
|
+
return NornicDBManager()
|
|
114
129
|
else:
|
|
115
|
-
raise ValueError(f"Unknown database type: '{db_type}'. Use 'kuzudb', 'falkordb', 'falkordb-remote', or '
|
|
130
|
+
raise ValueError(f"Unknown database type: '{db_type}'. Use 'kuzudb', 'falkordb', 'falkordb-remote', 'neo4j', or 'nornic'.")
|
|
116
131
|
|
|
117
132
|
# Implicit: remote FalkorDB when FALKORDB_HOST is set (explicit infra signal)
|
|
118
133
|
if _is_falkordb_remote_configured():
|
|
@@ -146,6 +161,12 @@ def get_database_manager(db_path: Optional[str] = None) -> Union['DatabaseManage
|
|
|
146
161
|
info_logger("Using Neo4j Server (auto-detected)")
|
|
147
162
|
return DatabaseManager()
|
|
148
163
|
|
|
164
|
+
# Implicit: Nornic when configured
|
|
165
|
+
if _is_nornic_configured():
|
|
166
|
+
from .database_nornic import NornicDBManager
|
|
167
|
+
info_logger("Using Nornic DB (auto-detected)")
|
|
168
|
+
return NornicDBManager()
|
|
169
|
+
|
|
149
170
|
error_msg = "No database backend available.\n"
|
|
150
171
|
error_msg += "Recommended: Install KùzuDB for zero-config ('pip install real_ladybug')\n"
|
|
151
172
|
|
|
@@ -161,5 +182,6 @@ from .database import DatabaseManager
|
|
|
161
182
|
from .database_falkordb import FalkorDBManager
|
|
162
183
|
from .database_falkordb_remote import FalkorDBRemoteManager
|
|
163
184
|
from .database_kuzu import KuzuDBManager
|
|
185
|
+
from .database_nornic import NornicDBManager
|
|
164
186
|
|
|
165
|
-
__all__ = ['DatabaseManager', 'FalkorDBManager', 'FalkorDBRemoteManager', 'KuzuDBManager', 'get_database_manager']
|
|
187
|
+
__all__ = ['DatabaseManager', 'FalkorDBManager', 'FalkorDBRemoteManager', 'KuzuDBManager', 'NornicDBManager', 'get_database_manager']
|