codegraphcontext 0.2.6__tar.gz → 0.2.8__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 (83) hide show
  1. {codegraphcontext-0.2.6/src/codegraphcontext.egg-info → codegraphcontext-0.2.8}/PKG-INFO +25 -3
  2. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/README.md +23 -2
  3. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/pyproject.toml +2 -1
  4. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/config_manager.py +11 -6
  5. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/main.py +36 -9
  6. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/setup_wizard.py +1 -1
  7. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/visualizer.py +459 -150
  8. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/__init__.py +32 -9
  9. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/database.py +30 -5
  10. codegraphcontext-0.2.8/src/codegraphcontext/core/database_falkordb_remote.py +197 -0
  11. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/advanced_language_query_tool.py +5 -1
  12. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/code_finder.py +4 -1
  13. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/graph_builder.py +0 -2
  14. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/swift.py +18 -13
  15. codegraphcontext-0.2.8/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +5 -0
  16. codegraphcontext-0.2.8/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +5 -0
  17. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8/src/codegraphcontext.egg-info}/PKG-INFO +25 -3
  18. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext.egg-info/SOURCES.txt +3 -0
  19. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext.egg-info/requires.txt +1 -0
  20. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/LICENSE +0 -0
  21. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/MANIFEST.in +0 -0
  22. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/setup.cfg +0 -0
  23. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/__init__.py +0 -0
  24. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/__main__.py +0 -0
  25. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/__init__.py +0 -0
  26. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/cli_helpers.py +0 -0
  27. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/registry_commands.py +0 -0
  28. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/cli/setup_macos.py +0 -0
  29. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/bundle_registry.py +0 -0
  30. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/cgc_bundle.py +0 -0
  31. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/database_falkordb.py +0 -0
  32. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/falkor_worker.py +0 -0
  33. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/jobs.py +0 -0
  34. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/core/watcher.py +0 -0
  35. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/prompts.py +0 -0
  36. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/server.py +0 -0
  37. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tool_definitions.py +0 -0
  38. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/__init__.py +0 -0
  39. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
  40. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
  41. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/handlers/management_handlers.py +0 -0
  42. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
  43. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
  44. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/c.py +0 -0
  45. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/cpp.py +0 -0
  46. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/csharp.py +0 -0
  47. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/dart.py +0 -0
  48. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/go.py +0 -0
  49. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/haskell.py +0 -0
  50. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/java.py +0 -0
  51. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/javascript.py +0 -0
  52. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
  53. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/perl.py +0 -0
  54. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/php.py +0 -0
  55. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/python.py +0 -0
  56. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/ruby.py +0 -0
  57. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/rust.py +0 -0
  58. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/scala.py +0 -0
  59. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/typescript.py +0 -0
  60. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
  61. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/package_resolver.py +0 -0
  62. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
  63. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
  64. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
  65. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
  66. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
  67. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
  68. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
  69. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
  70. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
  71. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
  72. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
  73. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
  74. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
  75. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/scip_indexer.py +0 -0
  76. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/scip_pb2.py +0 -0
  77. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/tools/system.py +0 -0
  78. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/utils/debug_log.py +0 -0
  79. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
  80. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext/utils/visualize_graph.py +0 -0
  81. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
  82. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
  83. {codegraphcontext-0.2.6 → codegraphcontext-0.2.8}/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.6
3
+ Version: 0.2.8
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
@@ -50,6 +50,7 @@ Requires-Dist: pytest
50
50
  Requires-Dist: nbformat
51
51
  Requires-Dist: nbconvert>=7.16.6
52
52
  Requires-Dist: pathspec>=0.12.1
53
+ Requires-Dist: falkordb>=0.1.0
53
54
  Requires-Dist: falkordblite>=0.1.0; sys_platform != "win32" and python_version >= "3.12"
54
55
  Provides-Extra: parsing
55
56
  Requires-Dist: tree-sitter>=0.21.0; extra == "parsing"
@@ -146,7 +147,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
146
147
  ---
147
148
 
148
149
  ## Project Details
149
- - **Version:** 0.2.6
150
+ - **Version:** 0.2.8
150
151
  - **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
151
152
  - **License:** MIT License (See [LICENSE](LICENSE) for details)
152
153
  - **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
@@ -178,7 +179,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
178
179
  - **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`cgc watch`).
179
180
  - **Interactive Setup:** A user-friendly command-line wizard for easy setup.
180
181
  - **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 12 programming languages.
182
+ - **Multi-Language Support:** Full support for 14 programming languages.
182
183
  - **Flexible Database Backend:** FalkorDB Lite (default, inbuilt for Unix and through WSL for Windows) or Neo4j (all platforms via Docker/native).
183
184
 
184
185
  ---
@@ -193,6 +194,7 @@ CodeGraphContext provides comprehensive parsing and analysis for the following l
193
194
  | ☕ | **Java** | 🏗️ | **C / C++** | #️⃣ | **C#** |
194
195
  | 🐹 | **Go** | 🦀 | **Rust** | 💎 | **Ruby** |
195
196
  | 🐘 | **PHP** | 🍎 | **Swift** | 🎨 | **Kotlin** |
197
+ | 🎯 | **Dart** | 🐪 | **Perl** | | |
196
198
 
197
199
  Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
198
200
 
@@ -349,6 +351,26 @@ cgc help
349
351
 
350
352
  **See the full [CLI Commands Guide](CLI_Commands.md) for all available commands and usage scenarios.**
351
353
 
354
+ ### 🎨 Premium Interactive Visualization
355
+ CodeGraphContext can generate stunning, interactive knowledge graphs of your code. Unlike static diagrams, these are premium web-based explorers:
356
+
357
+ - **Premium Aesthetics**: Dark mode, glassmorphism, and modern typography (Outfit/JetBrains Mono).
358
+ - **Interactive Inspection**: Click any node to open a detailed side panel with symbol information, file paths, and context.
359
+ - **Quick Search**: Live-search through the graph to find specific symbols instantly.
360
+ - **Intelligent Layouts**: Force-directed and hierarchical layouts that make complex relationships readable.
361
+ - **Zero-Dependency Viewing**: Standalone HTML files that work in any modern browser.
362
+
363
+ ```bash
364
+ # Visualize function calls
365
+ cgc analyze calls my_function --viz
366
+
367
+ # Explore class hierarchies
368
+ cgc analyze tree MyClass --viz
369
+
370
+ # Visualize search results
371
+ cgc find pattern "Auth" --viz
372
+ ```
373
+
352
374
 
353
375
  ---
354
376
 
@@ -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.6
87
+ - **Version:** 0.2.8
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 12 programming languages.
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.6"
3
+ version = "0.2.8"
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"
@@ -29,6 +29,7 @@ dependencies = [
29
29
  "nbformat",
30
30
  "nbconvert>=7.16.6",
31
31
  "pathspec>=0.12.1",
32
+ "falkordb>=0.1.0",
32
33
  "falkordblite>=0.1.0; sys_platform != 'win32' and python_version >= '3.12'"
33
34
  ]
34
35
 
@@ -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",
@@ -55,6 +56,7 @@ CONFIG_DESCRIPTIONS = {
55
56
  "DEBUG_LOGS": "Enable debug logging (for development/troubleshooting)",
56
57
  "DEBUG_LOG_PATH": "Path to debug log file",
57
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)",
58
60
  "LOG_FILE_PATH": "Path to application log file",
59
61
  "MAX_FILE_SIZE_MB": "Maximum file size to index (in MB)",
60
62
  "IGNORE_TEST_FILES": "Skip test files during indexing",
@@ -78,6 +80,7 @@ CONFIG_VALIDATORS = {
78
80
  "ALLOW_DB_DELETION": ["true", "false"],
79
81
  "DEBUG_LOGS": ["true", "false"],
80
82
  "ENABLE_APP_LOGS": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL", "DISABLED"],
83
+ "LIBRARY_LOG_LEVEL": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
81
84
  "IGNORE_TEST_FILES": ["true", "false"],
82
85
  "IGNORE_HIDDEN_FILES": ["true", "false"],
83
86
  "ENABLE_AUTO_WATCH": ["true", "false"],
@@ -86,13 +89,15 @@ CONFIG_VALIDATORS = {
86
89
  "SCIP_INDEXER": ["true", "false"],
87
90
  "SKIP_EXTERNAL_RESOLUTION": ["true", "false"],
88
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)
89
99
 
90
100
 
91
- def ensure_config_dir():
92
- """Ensure configuration directory exists."""
93
- CONFIG_DIR.mkdir(parents=True, exist_ok=True)
94
- (CONFIG_DIR / "logs").mkdir(parents=True, exist_ok=True)
95
-
96
101
 
97
102
  def load_config() -> Dict[str, str]:
98
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 WARNING to keep the output clean.
48
- logging.getLogger("neo4j").setLevel(logging.WARNING)
49
- logging.getLogger("asyncio").setLevel(logging.WARNING)
50
- logging.getLogger("urllib3").setLevel(logging.WARNING)
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
- console.print("[cyan]Using database: Neo4j[/cyan]")
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
- console.print("[cyan]Using database: FalkorDB[/cyan]")
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