contextl 1.2.37 → 1.2.39

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 (2) hide show
  1. package/package.json +1 -1
  2. package/python/installer.py +32 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contextl",
3
- "version": "1.2.37",
3
+ "version": "1.2.39",
4
4
  "description": "contextl — finds the most relevant files in your codebase for any change request. MCP server for AI coding agents.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -11,7 +11,7 @@ def install_mcp():
11
11
  targets = []
12
12
 
13
13
  # 1. Antigravity
14
- targets.append(home / ".gemini" / "antigravity" / "mcp_config.json")
14
+ targets.append(home / ".gemini" / "config" / "mcp_config.json")
15
15
 
16
16
  # 2. Claude Desktop
17
17
  if system == "Darwin":
@@ -55,11 +55,20 @@ def install_mcp():
55
55
  if "mcpServers" not in config:
56
56
  config["mcpServers"] = {}
57
57
 
58
+ # Determine ecosystem
59
+ is_npm = sys.argv[0].endswith("mcp_server.py") or "node_modules" in __file__
60
+
58
61
  # Inject contextl
59
- config["mcpServers"]["contextl"] = {
60
- "command": "npx",
61
- "args": ["-y", "contextl"]
62
- }
62
+ if is_npm:
63
+ config["mcpServers"]["contextl"] = {
64
+ "command": "npx",
65
+ "args": ["-y", "contextl"]
66
+ }
67
+ else:
68
+ config["mcpServers"]["contextl"] = {
69
+ "command": "contextl",
70
+ "args": []
71
+ }
63
72
 
64
73
  # Write config
65
74
  with open(path, "w", encoding="utf-8") as f:
@@ -73,13 +82,24 @@ def install_mcp():
73
82
  if success_count > 0:
74
83
  print("\nInstallation successful! Please restart your IDE or AI Client (e.g. reload the window) for the changes to take effect.")
75
84
  else:
85
+ is_npm = sys.argv[0].endswith("mcp_server.py") or "node_modules" in __file__
76
86
  print("No supported MCP configuration files were found automatically.")
77
87
  print("You may need to manually add the following JSON to your MCP configuration:")
78
- print(json.dumps({
79
- "mcpServers": {
80
- "contextl": {
81
- "command": "npx",
82
- "args": ["-y", "contextl"]
88
+ if is_npm:
89
+ print(json.dumps({
90
+ "mcpServers": {
91
+ "contextl": {
92
+ "command": "npx",
93
+ "args": ["-y", "contextl"]
94
+ }
95
+ }
96
+ }, indent=2))
97
+ else:
98
+ print(json.dumps({
99
+ "mcpServers": {
100
+ "contextl": {
101
+ "command": "contextl",
102
+ "args": []
103
+ }
83
104
  }
84
- }
85
- }, indent=2))
105
+ }, indent=2))