codegraphcontext 0.2.1__tar.gz → 0.2.3__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.1/src/codegraphcontext.egg-info → codegraphcontext-0.2.3}/PKG-INFO +5 -3
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/README.md +3 -2
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/pyproject.toml +3 -2
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/config_manager.py +20 -8
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/main.py +19 -5
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/setup_macos.py +2 -4
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/setup_wizard.py +48 -17
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3/src/codegraphcontext.egg-info}/PKG-INFO +5 -3
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext.egg-info/requires.txt +1 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/LICENSE +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/MANIFEST.in +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/setup.cfg +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/__init__.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/__main__.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/__init__.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/cli_helpers.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/registry_commands.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/visualizer.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/__init__.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/bundle_registry.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/cgc_bundle.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/database.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/database_falkordb.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/falkor_worker.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/jobs.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/watcher.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/prompts.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/server.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tool_definitions.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/__init__.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/code_finder.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/graph_builder.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/handlers/management_handlers.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/c.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/cpp.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/csharp.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/go.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/haskell.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/java.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/javascript.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/php.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/python.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/ruby.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/rust.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/scala.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/swift.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/typescript.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/package_resolver.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/system.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/utils/debug_log.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/utils/visualize_graph.py +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext.egg-info/SOURCES.txt +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
- {codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/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.3
|
|
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
|
|
@@ -51,6 +51,7 @@ Requires-Dist: nbformat
|
|
|
51
51
|
Requires-Dist: nbconvert>=7.16.6
|
|
52
52
|
Requires-Dist: pathspec>=0.12.1
|
|
53
53
|
Requires-Dist: falkordblite>=0.1.0; sys_platform != "win32" and python_version >= "3.12"
|
|
54
|
+
Requires-Dist: requests
|
|
54
55
|
Provides-Extra: parsing
|
|
55
56
|
Requires-Dist: tree-sitter>=0.21.0; extra == "parsing"
|
|
56
57
|
Requires-Dist: tree-sitter-language-pack>=0.6.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.
|
|
150
|
+
- **Version:** 0.2.3
|
|
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/)
|
|
@@ -271,7 +272,7 @@ Use CodeGraphContext as a **powerful command-line toolkit** for code analysis:
|
|
|
271
272
|
|
|
272
273
|
#### 🤖 Mode 2: MCP Server (AI-Powered)
|
|
273
274
|
Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
274
|
-
- Connect to AI IDEs (VS Code, Cursor, Windsurf, Claude, etc.)
|
|
275
|
+
- Connect to AI IDEs (VS Code, Cursor, Windsurf, Claude, Kiro, etc.)
|
|
275
276
|
- Let AI agents query your codebase using natural language
|
|
276
277
|
- Automatic code understanding and relationship analysis
|
|
277
278
|
- Perfect for AI-assisted development workflows
|
|
@@ -371,6 +372,7 @@ cgc help
|
|
|
371
372
|
* Cline
|
|
372
373
|
* RooCode
|
|
373
374
|
* Amazon Q Developer
|
|
375
|
+
* Kiro
|
|
374
376
|
|
|
375
377
|
Upon successful configuration, `cgc mcp setup` will generate and place the necessary configuration files:
|
|
376
378
|
* It creates an `mcp.json` file in your current directory for reference.
|
|
@@ -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.3
|
|
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/)
|
|
@@ -209,7 +209,7 @@ Use CodeGraphContext as a **powerful command-line toolkit** for code analysis:
|
|
|
209
209
|
|
|
210
210
|
#### 🤖 Mode 2: MCP Server (AI-Powered)
|
|
211
211
|
Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
212
|
-
- Connect to AI IDEs (VS Code, Cursor, Windsurf, Claude, etc.)
|
|
212
|
+
- Connect to AI IDEs (VS Code, Cursor, Windsurf, Claude, Kiro, etc.)
|
|
213
213
|
- Let AI agents query your codebase using natural language
|
|
214
214
|
- Automatic code understanding and relationship analysis
|
|
215
215
|
- Perfect for AI-assisted development workflows
|
|
@@ -309,6 +309,7 @@ cgc help
|
|
|
309
309
|
* Cline
|
|
310
310
|
* RooCode
|
|
311
311
|
* Amazon Q Developer
|
|
312
|
+
* Kiro
|
|
312
313
|
|
|
313
314
|
Upon successful configuration, `cgc mcp setup` will generate and place the necessary configuration files:
|
|
314
315
|
* It creates an `mcp.json` file in your current directory for reference.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codegraphcontext"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.3"
|
|
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,7 +29,8 @@ dependencies = [
|
|
|
29
29
|
"nbformat",
|
|
30
30
|
"nbconvert>=7.16.6",
|
|
31
31
|
"pathspec>=0.12.1",
|
|
32
|
-
"falkordblite>=0.1.0; sys_platform != 'win32' and python_version >= '3.12'"
|
|
32
|
+
"falkordblite>=0.1.0; sys_platform != 'win32' and python_version >= '3.12'",
|
|
33
|
+
"requests"
|
|
33
34
|
]
|
|
34
35
|
|
|
35
36
|
[project.optional-dependencies]
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/config_manager.py
RENAMED
|
@@ -92,9 +92,9 @@ def load_config() -> Dict[str, str]:
|
|
|
92
92
|
1. Environment variables
|
|
93
93
|
2. Local .env file (in current or parent directories)
|
|
94
94
|
3. Global ~/.codegraphcontext/.env
|
|
95
|
-
"""
|
|
96
|
-
ensure_config_dir()
|
|
97
95
|
|
|
96
|
+
Note: Does NOT create config directory - caller must call ensure_config_dir() first if needed.
|
|
97
|
+
"""
|
|
98
98
|
# Start with defaults
|
|
99
99
|
config = DEFAULT_CONFIG.copy()
|
|
100
100
|
|
|
@@ -160,12 +160,15 @@ def save_config(config: Dict[str, str], preserve_db_credentials: bool = True):
|
|
|
160
160
|
"""
|
|
161
161
|
Save configuration to file.
|
|
162
162
|
If preserve_db_credentials is True, existing database credentials will be preserved.
|
|
163
|
+
If preserve_db_credentials is False, credentials from config dict will be written.
|
|
163
164
|
"""
|
|
164
165
|
ensure_config_dir()
|
|
165
166
|
|
|
166
|
-
#
|
|
167
|
-
|
|
167
|
+
# Determine which credentials to write
|
|
168
|
+
credentials_to_write = {}
|
|
169
|
+
|
|
168
170
|
if preserve_db_credentials and CONFIG_FILE.exists():
|
|
171
|
+
# Load existing credentials from file to preserve them
|
|
169
172
|
try:
|
|
170
173
|
with open(CONFIG_FILE, "r") as f:
|
|
171
174
|
for line in f:
|
|
@@ -174,9 +177,14 @@ def save_config(config: Dict[str, str], preserve_db_credentials: bool = True):
|
|
|
174
177
|
key, value = line.split("=", 1)
|
|
175
178
|
key = key.strip()
|
|
176
179
|
if key in DATABASE_CREDENTIAL_KEYS:
|
|
177
|
-
|
|
180
|
+
credentials_to_write[key] = value.strip()
|
|
178
181
|
except Exception:
|
|
179
182
|
pass
|
|
183
|
+
else:
|
|
184
|
+
# Use credentials from the config dict being passed in
|
|
185
|
+
for key in DATABASE_CREDENTIAL_KEYS:
|
|
186
|
+
if key in config:
|
|
187
|
+
credentials_to_write[key] = config[key]
|
|
180
188
|
|
|
181
189
|
try:
|
|
182
190
|
with open(CONFIG_FILE, "w") as f:
|
|
@@ -184,11 +192,11 @@ def save_config(config: Dict[str, str], preserve_db_credentials: bool = True):
|
|
|
184
192
|
f.write(f"# Location: {CONFIG_FILE}\n\n")
|
|
185
193
|
|
|
186
194
|
# Write database credentials first if they exist
|
|
187
|
-
if
|
|
195
|
+
if credentials_to_write:
|
|
188
196
|
f.write("# ===== Database Credentials =====\n")
|
|
189
197
|
for key in sorted(DATABASE_CREDENTIAL_KEYS):
|
|
190
|
-
if key in
|
|
191
|
-
f.write(f"{key}={
|
|
198
|
+
if key in credentials_to_write:
|
|
199
|
+
f.write(f"{key}={credentials_to_write[key]}\n")
|
|
192
200
|
f.write("\n")
|
|
193
201
|
|
|
194
202
|
# Write configuration settings
|
|
@@ -296,6 +304,9 @@ def get_config_value(key: str) -> Optional[str]:
|
|
|
296
304
|
|
|
297
305
|
def set_config_value(key: str, value: str) -> bool:
|
|
298
306
|
"""Set a configuration value. Returns True if successful."""
|
|
307
|
+
# Ensure config directory exists
|
|
308
|
+
ensure_config_dir()
|
|
309
|
+
|
|
299
310
|
# Validate
|
|
300
311
|
is_valid, error_msg = validate_config_value(key, value)
|
|
301
312
|
if not is_valid:
|
|
@@ -313,6 +324,7 @@ def set_config_value(key: str, value: str) -> bool:
|
|
|
313
324
|
|
|
314
325
|
def reset_config():
|
|
315
326
|
"""Reset configuration to defaults (preserves database credentials)."""
|
|
327
|
+
ensure_config_dir()
|
|
316
328
|
save_config(DEFAULT_CONFIG.copy(), preserve_db_credentials=True)
|
|
317
329
|
console.print("[green]✅ Configuration reset to defaults[/green]")
|
|
318
330
|
console.print("[cyan]Note: Database credentials were preserved[/cyan]")
|
|
@@ -199,6 +199,9 @@ def neo4j_setup_alias():
|
|
|
199
199
|
neo4j_setup()
|
|
200
200
|
|
|
201
201
|
|
|
202
|
+
# ============================================================================
|
|
203
|
+
# CREDENTIALS LOADING PRECEDENCE
|
|
204
|
+
# ============================================================================
|
|
202
205
|
|
|
203
206
|
def _load_credentials():
|
|
204
207
|
"""
|
|
@@ -210,6 +213,10 @@ def _load_credentials():
|
|
|
210
213
|
3. Global `~/.codegraphcontext/.env` (lowest - user defaults)
|
|
211
214
|
"""
|
|
212
215
|
from dotenv import dotenv_values
|
|
216
|
+
from codegraphcontext.cli.config_manager import ensure_config_dir
|
|
217
|
+
|
|
218
|
+
# Ensure config directory exists (lazy initialization)
|
|
219
|
+
ensure_config_dir()
|
|
213
220
|
|
|
214
221
|
# Collect all config sources in reverse priority order (lowest to highest)
|
|
215
222
|
config_sources = []
|
|
@@ -287,8 +294,6 @@ def _load_credentials():
|
|
|
287
294
|
else:
|
|
288
295
|
console.print("[cyan]Using database: FalkorDB[/cyan]")
|
|
289
296
|
|
|
290
|
-
|
|
291
|
-
|
|
292
297
|
# ============================================================================
|
|
293
298
|
# CONFIG COMMAND GROUP
|
|
294
299
|
# ============================================================================
|
|
@@ -655,7 +660,13 @@ def doctor():
|
|
|
655
660
|
console.print("[bold]1. Checking Configuration...[/bold]")
|
|
656
661
|
try:
|
|
657
662
|
config = config_manager.load_config()
|
|
658
|
-
|
|
663
|
+
|
|
664
|
+
# Check if config file actually exists
|
|
665
|
+
if config_manager.CONFIG_FILE.exists():
|
|
666
|
+
console.print(f" [green]✓[/green] Configuration loaded from {config_manager.CONFIG_FILE}")
|
|
667
|
+
else:
|
|
668
|
+
console.print(f" [yellow]ℹ[/yellow] No config file found, using defaults")
|
|
669
|
+
console.print(f" [dim]Config will be created at: {config_manager.CONFIG_FILE}[/dim]")
|
|
659
670
|
|
|
660
671
|
# Validate each config value
|
|
661
672
|
invalid_configs = []
|
|
@@ -2047,9 +2058,12 @@ def cypher_legacy(query: str = typer.Argument(..., help="The read-only Cypher qu
|
|
|
2047
2058
|
# ============================================================================
|
|
2048
2059
|
|
|
2049
2060
|
@app.command("i", rich_help_panel="Shortcuts")
|
|
2050
|
-
def index_abbrev(
|
|
2061
|
+
def index_abbrev(
|
|
2062
|
+
path: Optional[str] = typer.Argument(None, help="Path to index"),
|
|
2063
|
+
force: bool = typer.Option(False, "--force", "-f", help="Force re-index (delete existing and rebuild)")
|
|
2064
|
+
):
|
|
2051
2065
|
"""Shortcut for 'cgc index'"""
|
|
2052
|
-
index(path)
|
|
2066
|
+
index(path, force=force)
|
|
2053
2067
|
|
|
2054
2068
|
@app.command("ls", rich_help_panel="Shortcuts")
|
|
2055
2069
|
def list_abbrev():
|
|
@@ -25,7 +25,7 @@ def _set_initial_password(new_pw: str, run_command, console) -> bool:
|
|
|
25
25
|
]
|
|
26
26
|
return run_command(cmd, console, check=False) is not None
|
|
27
27
|
|
|
28
|
-
def setup_macos_binary(console, prompt, run_command,
|
|
28
|
+
def setup_macos_binary(console, prompt, run_command, _save_neo4j_credentials):
|
|
29
29
|
"""Automates Neo4j install & config on macOS via Homebrew."""
|
|
30
30
|
os_name = platform.system()
|
|
31
31
|
console.print(f"Detected Operating System: [bold yellow]{os_name}[/bold yellow]")
|
|
@@ -89,7 +89,5 @@ def setup_macos_binary(console, prompt, run_command, _generate_mcp_json):
|
|
|
89
89
|
return
|
|
90
90
|
|
|
91
91
|
creds = {"uri": "neo4j://localhost:7687", "username": "neo4j", "password": new_password}
|
|
92
|
-
|
|
92
|
+
_save_neo4j_credentials(creds)
|
|
93
93
|
|
|
94
|
-
env_path = Path.home() / ".codegraphcontext" / ".env"
|
|
95
|
-
console.print(f"\n[bold green]All done![/bold green] Neo4j running. Credentials saved to: [bold]{env_path}[/bold]")
|
|
@@ -19,6 +19,39 @@ DEFAULT_NEO4J_USERNAME = "neo4j"
|
|
|
19
19
|
DEFAULT_NEO4J_BOLT_PORT = 7687
|
|
20
20
|
DEFAULT_NEO4J_HTTP_PORT = 7474
|
|
21
21
|
|
|
22
|
+
def _save_neo4j_credentials(creds):
|
|
23
|
+
"""
|
|
24
|
+
Save Neo4j credentials to .env file (database setup only).
|
|
25
|
+
Does NOT generate MCP config or configure IDE.
|
|
26
|
+
"""
|
|
27
|
+
from codegraphcontext.cli.config_manager import load_config, save_config, ensure_config_dir
|
|
28
|
+
|
|
29
|
+
ensure_config_dir()
|
|
30
|
+
|
|
31
|
+
# Load existing config (or defaults if no file exists)
|
|
32
|
+
config = load_config()
|
|
33
|
+
|
|
34
|
+
# Update Neo4j credentials
|
|
35
|
+
config["NEO4J_URI"] = creds.get('uri', '')
|
|
36
|
+
config["NEO4J_USERNAME"] = creds.get('username', 'neo4j')
|
|
37
|
+
config["NEO4J_PASSWORD"] = creds.get('password', '')
|
|
38
|
+
|
|
39
|
+
# Set default database to neo4j
|
|
40
|
+
config["DEFAULT_DATABASE"] = "neo4j"
|
|
41
|
+
|
|
42
|
+
# Save config (preserves all other settings)
|
|
43
|
+
save_config(config, preserve_db_credentials=False)
|
|
44
|
+
|
|
45
|
+
console.print("\n[bold green]✅ Neo4j setup complete![/bold green]")
|
|
46
|
+
console.print(f"[cyan]📝 Credentials saved to ~/.codegraphcontext/.env[/cyan]")
|
|
47
|
+
console.print(f"[cyan]🔧 Default database set to 'neo4j'[/cyan]")
|
|
48
|
+
console.print("\n[dim]You can now use cgc commands with Neo4j:[/dim]")
|
|
49
|
+
console.print("[dim] • cgc index . - Index your code[/dim]")
|
|
50
|
+
console.print("[dim] • cgc find function - Search your codebase[/dim]")
|
|
51
|
+
console.print("\n[dim]To use cgc as an MCP server in your IDE, run:[/dim]")
|
|
52
|
+
console.print("[dim] cgc mcp setup[/dim]")
|
|
53
|
+
|
|
54
|
+
|
|
22
55
|
def _generate_mcp_json(creds):
|
|
23
56
|
"""Generates and prints the MCP JSON configuration."""
|
|
24
57
|
cgc_path = shutil.which("cgc") or sys.executable
|
|
@@ -69,15 +102,8 @@ def _generate_mcp_json(creds):
|
|
|
69
102
|
json.dump(mcp_config, f, indent=2)
|
|
70
103
|
console.print(f"\n[cyan]For your convenience, the configuration has also been saved to: {mcp_file}[/cyan]")
|
|
71
104
|
|
|
72
|
-
# Also save to
|
|
73
|
-
|
|
74
|
-
env_file.parent.mkdir(parents=True, exist_ok=True)
|
|
75
|
-
with open(env_file, "w") as f:
|
|
76
|
-
f.write(f"NEO4J_URI={creds.get('uri', '')}\n")
|
|
77
|
-
f.write(f"NEO4J_USERNAME={creds.get('username', 'neo4j')}\n")
|
|
78
|
-
f.write(f"NEO4J_PASSWORD={creds.get('password', '')}\n")
|
|
79
|
-
|
|
80
|
-
console.print(f"[cyan]Neo4j credentials also saved to: {env_file}[/cyan]")
|
|
105
|
+
# Also save credentials to .env using the proper function
|
|
106
|
+
_save_neo4j_credentials(creds)
|
|
81
107
|
_configure_ide(mcp_config)
|
|
82
108
|
|
|
83
109
|
|
|
@@ -114,7 +140,7 @@ def _configure_ide(mcp_config):
|
|
|
114
140
|
questions = [
|
|
115
141
|
{
|
|
116
142
|
"type": "confirm",
|
|
117
|
-
"message": "Automatically configure your IDE/CLI (VS Code, Cursor, Windsurf, Claude, Gemini, Cline, RooCode, ChatGPT Codex, Amazon Q Developer, Aider)?",
|
|
143
|
+
"message": "Automatically configure your IDE/CLI (VS Code, Cursor, Windsurf, Claude, Gemini, Cline, RooCode, ChatGPT Codex, Amazon Q Developer, Aider, Kiro)?",
|
|
118
144
|
"name": "configure_ide",
|
|
119
145
|
"default": True,
|
|
120
146
|
}
|
|
@@ -128,7 +154,7 @@ def _configure_ide(mcp_config):
|
|
|
128
154
|
{
|
|
129
155
|
"type": "list",
|
|
130
156
|
"message": "Choose your IDE/CLI to configure:",
|
|
131
|
-
"choices": ["VS Code", "Cursor", "Windsurf", "Claude code", "Gemini CLI", "ChatGPT Codex", "Cline", "RooCode", "Amazon Q Developer", "JetBrainsAI", "Aider", "None of the above"],
|
|
157
|
+
"choices": ["VS Code", "Cursor", "Windsurf", "Claude code", "Gemini CLI", "ChatGPT Codex", "Cline", "RooCode", "Amazon Q Developer", "JetBrainsAI", "Aider", "Kiro", "None of the above"],
|
|
132
158
|
"name": "ide_choice",
|
|
133
159
|
}
|
|
134
160
|
]
|
|
@@ -140,7 +166,7 @@ def _configure_ide(mcp_config):
|
|
|
140
166
|
return
|
|
141
167
|
|
|
142
168
|
|
|
143
|
-
if ide_choice in ["VS Code", "Cursor/CLI", "Claude code", "Gemini CLI", "ChatGPT Codex", "Cline", "Windsurf", "RooCode", "Amazon Q Developer , JetBrainsAI", "Aider"]:
|
|
169
|
+
if ide_choice in ["VS Code", "Cursor/CLI", "Claude code", "Gemini CLI", "ChatGPT Codex", "Cline", "Windsurf", "RooCode", "Amazon Q Developer , JetBrainsAI", "Aider", "Kiro"]:
|
|
144
170
|
console.print(f"\n[bold cyan]Configuring for {ide_choice}...[/bold cyan]")
|
|
145
171
|
|
|
146
172
|
if ide_choice == "Amazon Q Developer":
|
|
@@ -198,6 +224,11 @@ def _configure_ide(mcp_config):
|
|
|
198
224
|
Path.home() / "Library" / "Application Support" / "aider" / "settings.json",
|
|
199
225
|
Path.home() / "AppData" / "Roaming" / "aider" / "settings.json",
|
|
200
226
|
Path.home() / ".config" / "Aider" / "User" / "settings.json",
|
|
227
|
+
],
|
|
228
|
+
"Kiro": [
|
|
229
|
+
Path.home() / ".kiro" / "settings" / "mcp.json", # macOS / Linux / Windows (user-level global)
|
|
230
|
+
Path.home() / ".config" / "kiro" / "settings" / "mcp.json", # Linux (XDG config)
|
|
231
|
+
Path.home() / "AppData" / "Roaming" / "Kiro" / "settings" / "mcp.json", # Windows
|
|
201
232
|
]
|
|
202
233
|
}
|
|
203
234
|
|
|
@@ -540,7 +571,7 @@ def setup_existing_db():
|
|
|
540
571
|
|
|
541
572
|
|
|
542
573
|
if creds.get("uri") and creds.get("password"):
|
|
543
|
-
|
|
574
|
+
_save_neo4j_credentials(creds)
|
|
544
575
|
else:
|
|
545
576
|
console.print("[red]❌ Incomplete credentials. Please try again.[/red]")
|
|
546
577
|
|
|
@@ -658,7 +689,7 @@ def setup_hosted_db():
|
|
|
658
689
|
|
|
659
690
|
|
|
660
691
|
if creds.get("uri") and creds.get("password"):
|
|
661
|
-
|
|
692
|
+
_save_neo4j_credentials(creds)
|
|
662
693
|
else:
|
|
663
694
|
console.print("[red]❌ Incomplete credentials. Please try again.[/red]")
|
|
664
695
|
|
|
@@ -681,7 +712,7 @@ def setup_local_db():
|
|
|
681
712
|
if platform.system() == "Darwin":
|
|
682
713
|
# lazy import to avoid circular import
|
|
683
714
|
from .setup_macos import setup_macos_binary
|
|
684
|
-
setup_macos_binary(console, prompt, run_command,
|
|
715
|
+
setup_macos_binary(console, prompt, run_command, _save_neo4j_credentials)
|
|
685
716
|
else:
|
|
686
717
|
setup_local_binary()
|
|
687
718
|
|
|
@@ -829,7 +860,7 @@ volumes:
|
|
|
829
860
|
"password": password
|
|
830
861
|
}
|
|
831
862
|
|
|
832
|
-
|
|
863
|
+
_save_neo4j_credentials(creds)
|
|
833
864
|
|
|
834
865
|
console.print("\n[bold green]🎉 Setup complete![/bold green]")
|
|
835
866
|
console.print("Neo4j is running at:")
|
|
@@ -924,5 +955,5 @@ def setup_local_binary():
|
|
|
924
955
|
"username": "neo4j",
|
|
925
956
|
"password": new_password
|
|
926
957
|
}
|
|
927
|
-
|
|
958
|
+
_save_neo4j_credentials(creds)
|
|
928
959
|
console.print("\n[bold green]All done! Your local Neo4j instance is ready to use.[/bold green]")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraphcontext
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
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
|
|
@@ -51,6 +51,7 @@ Requires-Dist: nbformat
|
|
|
51
51
|
Requires-Dist: nbconvert>=7.16.6
|
|
52
52
|
Requires-Dist: pathspec>=0.12.1
|
|
53
53
|
Requires-Dist: falkordblite>=0.1.0; sys_platform != "win32" and python_version >= "3.12"
|
|
54
|
+
Requires-Dist: requests
|
|
54
55
|
Provides-Extra: parsing
|
|
55
56
|
Requires-Dist: tree-sitter>=0.21.0; extra == "parsing"
|
|
56
57
|
Requires-Dist: tree-sitter-language-pack>=0.6.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.
|
|
150
|
+
- **Version:** 0.2.3
|
|
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/)
|
|
@@ -271,7 +272,7 @@ Use CodeGraphContext as a **powerful command-line toolkit** for code analysis:
|
|
|
271
272
|
|
|
272
273
|
#### 🤖 Mode 2: MCP Server (AI-Powered)
|
|
273
274
|
Use CodeGraphContext as an **MCP server** for AI assistants:
|
|
274
|
-
- Connect to AI IDEs (VS Code, Cursor, Windsurf, Claude, etc.)
|
|
275
|
+
- Connect to AI IDEs (VS Code, Cursor, Windsurf, Claude, Kiro, etc.)
|
|
275
276
|
- Let AI agents query your codebase using natural language
|
|
276
277
|
- Automatic code understanding and relationship analysis
|
|
277
278
|
- Perfect for AI-assisted development workflows
|
|
@@ -371,6 +372,7 @@ cgc help
|
|
|
371
372
|
* Cline
|
|
372
373
|
* RooCode
|
|
373
374
|
* Amazon Q Developer
|
|
375
|
+
* Kiro
|
|
374
376
|
|
|
375
377
|
Upon successful configuration, `cgc mcp setup` will generate and place the necessary configuration files:
|
|
376
378
|
* It creates an `mcp.json` file in your current directory for reference.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/cli/registry_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/bundle_registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/database_falkordb.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/core/falkor_worker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/graph_builder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/cpp.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/csharp.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/go.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/haskell.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/java.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/javascript.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/kotlin.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/php.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/python.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/ruby.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/rust.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/scala.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/swift.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/languages/typescript.py
RENAMED
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/tools/package_resolver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/utils/tree_sitter_manager.py
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext/utils/visualize_graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{codegraphcontext-0.2.1 → codegraphcontext-0.2.3}/src/codegraphcontext.egg-info/top_level.txt
RENAMED
|
File without changes
|