codegraphcontext 0.2.5__tar.gz → 0.2.7__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.2.5/src/codegraphcontext.egg-info → codegraphcontext-0.2.7}/PKG-INFO +24 -3
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/README.md +23 -2
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/pyproject.toml +1 -1
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/config_manager.py +20 -6
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/main.py +36 -9
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/setup_wizard.py +1 -1
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/visualizer.py +459 -150
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/__init__.py +32 -9
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/database.py +30 -5
- codegraphcontext-0.2.7/src/codegraphcontext/core/database_falkordb_remote.py +197 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/advanced_language_query_tool.py +5 -1
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/code_finder.py +4 -1
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/graph_builder.py +223 -3
- codegraphcontext-0.2.7/src/codegraphcontext/tools/languages/dart.py +368 -0
- codegraphcontext-0.2.7/src/codegraphcontext/tools/languages/perl.py +255 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/swift.py +18 -13
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/package_resolver.py +29 -1
- codegraphcontext-0.2.7/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +5 -0
- codegraphcontext-0.2.7/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +5 -0
- codegraphcontext-0.2.7/src/codegraphcontext/tools/scip_indexer.py +467 -0
- codegraphcontext-0.2.7/src/codegraphcontext/tools/scip_pb2.py +2455 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/utils/tree_sitter_manager.py +4 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7/src/codegraphcontext.egg-info}/PKG-INFO +24 -3
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext.egg-info/SOURCES.txt +7 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/LICENSE +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/MANIFEST.in +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/setup.cfg +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/__init__.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/__main__.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/__init__.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/cli_helpers.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/registry_commands.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/setup_macos.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/bundle_registry.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/cgc_bundle.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/database_falkordb.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/falkor_worker.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/jobs.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/core/watcher.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/prompts.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/server.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tool_definitions.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/__init__.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/handlers/management_handlers.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/c.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/cpp.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/csharp.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/go.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/haskell.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/java.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/javascript.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/php.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/python.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/ruby.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/rust.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/scala.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/typescript.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/tools/system.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/utils/debug_log.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/utils/visualize_graph.py +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext.egg-info/requires.txt +0 -0
- {codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/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.2.
|
|
3
|
+
Version: 0.2.7
|
|
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
|
|
@@ -146,7 +146,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
146
146
|
---
|
|
147
147
|
|
|
148
148
|
## Project Details
|
|
149
|
-
- **Version:** 0.2.
|
|
149
|
+
- **Version:** 0.2.7
|
|
150
150
|
- **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
|
|
151
151
|
- **License:** MIT License (See [LICENSE](LICENSE) for details)
|
|
152
152
|
- **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
|
|
@@ -178,7 +178,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
178
178
|
- **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`cgc watch`).
|
|
179
179
|
- **Interactive Setup:** A user-friendly command-line wizard for easy setup.
|
|
180
180
|
- **Dual Mode:** Works as a standalone **CLI toolkit** for developers and as an **MCP server** for AI agents.
|
|
181
|
-
- **Multi-Language Support:** Full support for
|
|
181
|
+
- **Multi-Language Support:** Full support for 14 programming languages.
|
|
182
182
|
- **Flexible Database Backend:** FalkorDB Lite (default, inbuilt for Unix and through WSL for Windows) or Neo4j (all platforms via Docker/native).
|
|
183
183
|
|
|
184
184
|
---
|
|
@@ -193,6 +193,7 @@ CodeGraphContext provides comprehensive parsing and analysis for the following l
|
|
|
193
193
|
| ☕ | **Java** | 🏗️ | **C / C++** | #️⃣ | **C#** |
|
|
194
194
|
| 🐹 | **Go** | 🦀 | **Rust** | 💎 | **Ruby** |
|
|
195
195
|
| 🐘 | **PHP** | 🍎 | **Swift** | 🎨 | **Kotlin** |
|
|
196
|
+
| 🎯 | **Dart** | 🐪 | **Perl** | | |
|
|
196
197
|
|
|
197
198
|
Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
|
|
198
199
|
|
|
@@ -349,6 +350,26 @@ cgc help
|
|
|
349
350
|
|
|
350
351
|
**See the full [CLI Commands Guide](CLI_Commands.md) for all available commands and usage scenarios.**
|
|
351
352
|
|
|
353
|
+
### 🎨 Premium Interactive Visualization
|
|
354
|
+
CodeGraphContext can generate stunning, interactive knowledge graphs of your code. Unlike static diagrams, these are premium web-based explorers:
|
|
355
|
+
|
|
356
|
+
- **Premium Aesthetics**: Dark mode, glassmorphism, and modern typography (Outfit/JetBrains Mono).
|
|
357
|
+
- **Interactive Inspection**: Click any node to open a detailed side panel with symbol information, file paths, and context.
|
|
358
|
+
- **Quick Search**: Live-search through the graph to find specific symbols instantly.
|
|
359
|
+
- **Intelligent Layouts**: Force-directed and hierarchical layouts that make complex relationships readable.
|
|
360
|
+
- **Zero-Dependency Viewing**: Standalone HTML files that work in any modern browser.
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
# Visualize function calls
|
|
364
|
+
cgc analyze calls my_function --viz
|
|
365
|
+
|
|
366
|
+
# Explore class hierarchies
|
|
367
|
+
cgc analyze tree MyClass --viz
|
|
368
|
+
|
|
369
|
+
# Visualize search results
|
|
370
|
+
cgc find pattern "Auth" --viz
|
|
371
|
+
```
|
|
372
|
+
|
|
352
373
|
|
|
353
374
|
---
|
|
354
375
|
|
|
@@ -84,7 +84,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
84
84
|
---
|
|
85
85
|
|
|
86
86
|
## Project Details
|
|
87
|
-
- **Version:** 0.2.
|
|
87
|
+
- **Version:** 0.2.7
|
|
88
88
|
- **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
|
|
89
89
|
- **License:** MIT License (See [LICENSE](LICENSE) for details)
|
|
90
90
|
- **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
|
|
@@ -116,7 +116,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
|
|
|
116
116
|
- **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`cgc watch`).
|
|
117
117
|
- **Interactive Setup:** A user-friendly command-line wizard for easy setup.
|
|
118
118
|
- **Dual Mode:** Works as a standalone **CLI toolkit** for developers and as an **MCP server** for AI agents.
|
|
119
|
-
- **Multi-Language Support:** Full support for
|
|
119
|
+
- **Multi-Language Support:** Full support for 14 programming languages.
|
|
120
120
|
- **Flexible Database Backend:** FalkorDB Lite (default, inbuilt for Unix and through WSL for Windows) or Neo4j (all platforms via Docker/native).
|
|
121
121
|
|
|
122
122
|
---
|
|
@@ -131,6 +131,7 @@ CodeGraphContext provides comprehensive parsing and analysis for the following l
|
|
|
131
131
|
| ☕ | **Java** | 🏗️ | **C / C++** | #️⃣ | **C#** |
|
|
132
132
|
| 🐹 | **Go** | 🦀 | **Rust** | 💎 | **Ruby** |
|
|
133
133
|
| 🐘 | **PHP** | 🍎 | **Swift** | 🎨 | **Kotlin** |
|
|
134
|
+
| 🎯 | **Dart** | 🐪 | **Perl** | | |
|
|
134
135
|
|
|
135
136
|
Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
|
|
136
137
|
|
|
@@ -287,6 +288,26 @@ cgc help
|
|
|
287
288
|
|
|
288
289
|
**See the full [CLI Commands Guide](CLI_Commands.md) for all available commands and usage scenarios.**
|
|
289
290
|
|
|
291
|
+
### 🎨 Premium Interactive Visualization
|
|
292
|
+
CodeGraphContext can generate stunning, interactive knowledge graphs of your code. Unlike static diagrams, these are premium web-based explorers:
|
|
293
|
+
|
|
294
|
+
- **Premium Aesthetics**: Dark mode, glassmorphism, and modern typography (Outfit/JetBrains Mono).
|
|
295
|
+
- **Interactive Inspection**: Click any node to open a detailed side panel with symbol information, file paths, and context.
|
|
296
|
+
- **Quick Search**: Live-search through the graph to find specific symbols instantly.
|
|
297
|
+
- **Intelligent Layouts**: Force-directed and hierarchical layouts that make complex relationships readable.
|
|
298
|
+
- **Zero-Dependency Viewing**: Standalone HTML files that work in any modern browser.
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
# Visualize function calls
|
|
302
|
+
cgc analyze calls my_function --viz
|
|
303
|
+
|
|
304
|
+
# Explore class hierarchies
|
|
305
|
+
cgc analyze tree MyClass --viz
|
|
306
|
+
|
|
307
|
+
# Visualize search results
|
|
308
|
+
cgc find pattern "Auth" --viz
|
|
309
|
+
```
|
|
310
|
+
|
|
290
311
|
|
|
291
312
|
---
|
|
292
313
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codegraphcontext"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7"
|
|
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"
|
{codegraphcontext-0.2.5 → codegraphcontext-0.2.7}/src/codegraphcontext/cli/config_manager.py
RENAMED
|
@@ -16,7 +16,7 @@ CONFIG_DIR = Path.home() / ".codegraphcontext"
|
|
|
16
16
|
CONFIG_FILE = CONFIG_DIR / ".env"
|
|
17
17
|
|
|
18
18
|
# Database credential keys (stored in same .env file but not managed as config)
|
|
19
|
-
DATABASE_CREDENTIAL_KEYS = {"NEO4J_URI", "NEO4J_USERNAME", "NEO4J_PASSWORD"}
|
|
19
|
+
DATABASE_CREDENTIAL_KEYS = {"NEO4J_URI", "NEO4J_USERNAME", "NEO4J_PASSWORD", "NEO4J_DATABASE"}
|
|
20
20
|
|
|
21
21
|
# Default configuration values
|
|
22
22
|
DEFAULT_CONFIG = {
|
|
@@ -28,6 +28,7 @@ DEFAULT_CONFIG = {
|
|
|
28
28
|
"DEBUG_LOGS": "false",
|
|
29
29
|
"DEBUG_LOG_PATH": str(Path.home() / "mcp_debug.log"),
|
|
30
30
|
"ENABLE_APP_LOGS": "CRITICAL",
|
|
31
|
+
"LIBRARY_LOG_LEVEL": "WARNING",
|
|
31
32
|
"LOG_FILE_PATH": str(CONFIG_DIR / "logs" / "cgc.log"),
|
|
32
33
|
"MAX_FILE_SIZE_MB": "10",
|
|
33
34
|
"IGNORE_TEST_FILES": "false",
|
|
@@ -39,6 +40,10 @@ DEFAULT_CONFIG = {
|
|
|
39
40
|
"CACHE_ENABLED": "true",
|
|
40
41
|
"IGNORE_DIRS": "node_modules,venv,.venv,env,.env,dist,build,target,out,.git,.idea,.vscode,__pycache__",
|
|
41
42
|
"INDEX_SOURCE": "true",
|
|
43
|
+
# SCIP indexer feature flag (default off — existing Tree-sitter behaviour unchanged)
|
|
44
|
+
"SCIP_INDEXER": "false",
|
|
45
|
+
"SCIP_LANGUAGES": "python,typescript,go,rust,java",
|
|
46
|
+
"SKIP_EXTERNAL_RESOLUTION": "false",
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
# Configuration key descriptions
|
|
@@ -51,6 +56,7 @@ CONFIG_DESCRIPTIONS = {
|
|
|
51
56
|
"DEBUG_LOGS": "Enable debug logging (for development/troubleshooting)",
|
|
52
57
|
"DEBUG_LOG_PATH": "Path to debug log file",
|
|
53
58
|
"ENABLE_APP_LOGS": "Application log level (DEBUG|INFO|WARNING|ERROR|CRITICAL|DISABLED)",
|
|
59
|
+
"LIBRARY_LOG_LEVEL": "Log level for third-party libraries (neo4j, asyncio, urllib3) (DEBUG|INFO|WARNING|ERROR|CRITICAL)",
|
|
54
60
|
"LOG_FILE_PATH": "Path to application log file",
|
|
55
61
|
"MAX_FILE_SIZE_MB": "Maximum file size to index (in MB)",
|
|
56
62
|
"IGNORE_TEST_FILES": "Skip test files during indexing",
|
|
@@ -62,6 +68,9 @@ CONFIG_DESCRIPTIONS = {
|
|
|
62
68
|
"CACHE_ENABLED": "Enable caching for faster re-indexing",
|
|
63
69
|
"IGNORE_DIRS": "Comma-separated list of directory names to ignore during indexing",
|
|
64
70
|
"INDEX_SOURCE": "Store full source code in graph database (for faster indexing use false, for better performance use true)",
|
|
71
|
+
"SCIP_INDEXER": "Use SCIP-based indexing for higher accuracy call/inheritance resolution (requires scip-<lang> tools installed)",
|
|
72
|
+
"SCIP_LANGUAGES": "Comma-separated languages to index via SCIP when SCIP_INDEXER=true (python,typescript,go,rust,java)",
|
|
73
|
+
"SKIP_EXTERNAL_RESOLUTION": "Skip resolution attempts for external library method calls (recommended for enterprise large Java/Spring codebases)",
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
# Valid values for each config key
|
|
@@ -71,19 +80,24 @@ CONFIG_VALIDATORS = {
|
|
|
71
80
|
"ALLOW_DB_DELETION": ["true", "false"],
|
|
72
81
|
"DEBUG_LOGS": ["true", "false"],
|
|
73
82
|
"ENABLE_APP_LOGS": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL", "DISABLED"],
|
|
83
|
+
"LIBRARY_LOG_LEVEL": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
|
74
84
|
"IGNORE_TEST_FILES": ["true", "false"],
|
|
75
85
|
"IGNORE_HIDDEN_FILES": ["true", "false"],
|
|
76
86
|
"ENABLE_AUTO_WATCH": ["true", "false"],
|
|
77
87
|
"CACHE_ENABLED": ["true", "false"],
|
|
78
88
|
"INDEX_SOURCE": ["true", "false"],
|
|
89
|
+
"SCIP_INDEXER": ["true", "false"],
|
|
90
|
+
"SKIP_EXTERNAL_RESOLUTION": ["true", "false"],
|
|
79
91
|
}
|
|
92
|
+
def ensure_config_dir(path: Path = CONFIG_DIR):
|
|
93
|
+
"""
|
|
94
|
+
Ensure that the configuration directory exists.
|
|
95
|
+
Creates the directory and a logs subdirectory if they do not already exist.
|
|
96
|
+
"""
|
|
97
|
+
path.mkdir(parents=True, exist_ok=True)
|
|
98
|
+
(path / "logs").mkdir(parents=True, exist_ok=True)
|
|
80
99
|
|
|
81
100
|
|
|
82
|
-
def ensure_config_dir():
|
|
83
|
-
"""Ensure configuration directory exists."""
|
|
84
|
-
CONFIG_DIR.mkdir(parents=True, exist_ok=True)
|
|
85
|
-
(CONFIG_DIR / "logs").mkdir(parents=True, exist_ok=True)
|
|
86
|
-
|
|
87
101
|
|
|
88
102
|
def load_config() -> Dict[str, str]:
|
|
89
103
|
"""
|
|
@@ -44,10 +44,24 @@ from .cli_helpers import (
|
|
|
44
44
|
list_watching_helper,
|
|
45
45
|
)
|
|
46
46
|
|
|
47
|
-
# Set the log level for the noisy neo4j, asyncio, and urllib3 loggers to
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
# Set the log level for the noisy neo4j, asyncio, and urllib3 loggers to keep the output clean.
|
|
48
|
+
# Get the log level from config, defaulting to WARNING
|
|
49
|
+
def _configure_library_loggers():
|
|
50
|
+
"""Configure third-party library loggers based on config setting."""
|
|
51
|
+
try:
|
|
52
|
+
log_level_str = config_manager.get_config_value('LIBRARY_LOG_LEVEL')
|
|
53
|
+
if log_level_str is None:
|
|
54
|
+
log_level_str = 'WARNING'
|
|
55
|
+
log_level_str = str(log_level_str).upper()
|
|
56
|
+
log_level = getattr(logging, log_level_str, logging.WARNING)
|
|
57
|
+
except (AttributeError, Exception):
|
|
58
|
+
log_level = logging.WARNING
|
|
59
|
+
|
|
60
|
+
logging.getLogger("neo4j").setLevel(log_level)
|
|
61
|
+
logging.getLogger("asyncio").setLevel(log_level)
|
|
62
|
+
logging.getLogger("urllib3").setLevel(log_level)
|
|
63
|
+
|
|
64
|
+
_configure_library_loggers()
|
|
51
65
|
|
|
52
66
|
|
|
53
67
|
# Import visualization module
|
|
@@ -288,11 +302,24 @@ def _load_credentials():
|
|
|
288
302
|
os.environ.get("NEO4J_PASSWORD")
|
|
289
303
|
])
|
|
290
304
|
if has_neo4j_creds:
|
|
291
|
-
|
|
305
|
+
neo4j_db = os.environ.get("NEO4J_DATABASE")
|
|
306
|
+
if neo4j_db:
|
|
307
|
+
console.print(f"[cyan]Using database: Neo4j (database: {neo4j_db})[/cyan]")
|
|
308
|
+
else:
|
|
309
|
+
console.print("[cyan]Using database: Neo4j[/cyan]")
|
|
292
310
|
else:
|
|
293
311
|
console.print("[yellow]⚠ DEFAULT_DATABASE=neo4j but credentials not found. Falling back to FalkorDB.[/yellow]")
|
|
312
|
+
elif default_db == "falkordb-remote":
|
|
313
|
+
host = os.environ.get("FALKORDB_HOST")
|
|
314
|
+
if host:
|
|
315
|
+
console.print(f"[cyan]Using database: FalkorDB Remote ({host})[/cyan]")
|
|
316
|
+
else:
|
|
317
|
+
console.print("[yellow]⚠ DATABASE_TYPE=falkordb-remote but FALKORDB_HOST not set.[/yellow]")
|
|
294
318
|
else:
|
|
295
|
-
|
|
319
|
+
if os.environ.get("FALKORDB_HOST"):
|
|
320
|
+
console.print(f"[cyan]Using database: FalkorDB Remote ({os.environ.get('FALKORDB_HOST')})[/cyan]")
|
|
321
|
+
else:
|
|
322
|
+
console.print("[cyan]Using database: FalkorDB[/cyan]")
|
|
296
323
|
|
|
297
324
|
# ============================================================================
|
|
298
325
|
# CONFIG COMMAND GROUP
|
|
@@ -352,9 +379,9 @@ def config_db(backend: str = typer.Argument(..., help="Database backend: 'neo4j'
|
|
|
352
379
|
cgc config db falkordb
|
|
353
380
|
"""
|
|
354
381
|
backend = backend.lower()
|
|
355
|
-
if backend not in ['falkordb', 'neo4j']:
|
|
382
|
+
if backend not in ['falkordb', 'falkordb-remote', 'neo4j']:
|
|
356
383
|
console.print(f"[bold red]Invalid backend: {backend}[/bold red]")
|
|
357
|
-
console.print("Must be 'falkordb' or 'neo4j'")
|
|
384
|
+
console.print("Must be 'falkordb', 'falkordb-remote', or 'neo4j'")
|
|
358
385
|
raise typer.Exit(code=1)
|
|
359
386
|
|
|
360
387
|
config_manager.set_config_value("DEFAULT_DATABASE", backend)
|
|
@@ -700,7 +727,7 @@ def doctor():
|
|
|
700
727
|
|
|
701
728
|
if uri and username and password:
|
|
702
729
|
console.print(f" [cyan]Testing Neo4j connection to {uri}...[/cyan]")
|
|
703
|
-
is_connected, error_msg = DatabaseManager.test_connection(uri, username, password)
|
|
730
|
+
is_connected, error_msg = DatabaseManager.test_connection(uri, username, password, database=os.environ.get("NEO4J_DATABASE"))
|
|
704
731
|
if is_connected:
|
|
705
732
|
console.print(f" [green]✓[/green] Neo4j connection successful")
|
|
706
733
|
else:
|
|
@@ -377,7 +377,7 @@ def configure_mcp_client():
|
|
|
377
377
|
if line and not line.startswith("#") and "=" in line:
|
|
378
378
|
key, value = line.split("=", 1)
|
|
379
379
|
key = key.strip()
|
|
380
|
-
if key in ["NEO4J_URI", "NEO4J_USERNAME", "NEO4J_PASSWORD"]:
|
|
380
|
+
if key in ["NEO4J_URI", "NEO4J_USERNAME", "NEO4J_PASSWORD", "NEO4J_DATABASE"]:
|
|
381
381
|
env_vars[key] = value.strip()
|
|
382
382
|
except Exception:
|
|
383
383
|
pass
|