contextl 1.2.36 → 1.2.37

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/main.py +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contextl",
3
- "version": "1.2.36",
3
+ "version": "1.2.37",
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",
package/python/main.py CHANGED
@@ -219,18 +219,26 @@ def build_parser() -> argparse.ArgumentParser:
219
219
  review_parser.add_argument("--unstaged", action="store_true", help="Only include unstaged changes")
220
220
  review_parser.add_argument("--json", action="store_true", help="Output clean JSON instead of human-readable text")
221
221
 
222
+ # 6. Install MCP Server
223
+ install_parser = subparsers.add_parser("install", help="Automatically install the ContextL MCP server into your AI Client")
224
+
222
225
  return parser
223
226
 
224
227
 
225
228
  def main():
226
229
  # To maintain backward compatibility with old `contextl <repo> <query>`
227
230
  # we manually inject "search" if the first argument isn't a known command.
228
- if len(sys.argv) >= 2 and sys.argv[1] not in ["search", "standalone", "impact", "obsidian", "review", "-h", "--help"]:
231
+ if len(sys.argv) >= 2 and sys.argv[1] not in ["search", "standalone", "impact", "obsidian", "review", "install", "-h", "--help"]:
229
232
  sys.argv.insert(1, "search")
230
233
 
231
234
  parser = build_parser()
232
235
  args = parser.parse_args()
233
236
 
237
+ if args.command == "install":
238
+ from installer import install_mcp
239
+ install_mcp()
240
+ sys.exit(0)
241
+
234
242
  if args.command == "search":
235
243
  results, repo_graph, elapsed = run_engine(args.repo_path, args.query, args.top)
236
244