MCPcopy
hub / github.com/tirth8205/code-review-graph / main

Function main

code_review_graph/cli.py:351–1243  ·  view source on GitHub ↗

Main CLI entry point.

()

Source from the content-addressed store, hash-verified

349
350
351def main() -> None:
352 """Main CLI entry point."""
353 ap = argparse.ArgumentParser(
354 prog="code-review-graph",
355 description="Persistent incremental knowledge graph for code reviews",
356 )
357 ap.add_argument("-v", "--version", action="store_true", help="Show version and exit")
358 sub = ap.add_subparsers(dest="command")
359
360 # install (primary) + init (alias)
361 install_cmd = sub.add_parser("install", help="Register MCP server with AI coding platforms")
362 install_cmd.add_argument("--repo", default=None, help="Repository root (auto-detected)")
363 install_cmd.add_argument(
364 "--dry-run",
365 action="store_true",
366 help="Show what would be done without writing files",
367 )
368 install_cmd.add_argument(
369 "--no-skills",
370 action="store_true",
371 help="Skip generating platform-native skill files",
372 )
373 install_cmd.add_argument(
374 "--no-hooks",
375 action="store_true",
376 help="Skip installing platform-native hooks",
377 )
378 install_cmd.add_argument(
379 "--no-instructions",
380 action="store_true",
381 help="Skip injecting graph instructions into CLAUDE.md / AGENTS.md / etc.",
382 )
383 install_cmd.add_argument(
384 "-y",
385 "--yes",
386 action="store_true",
387 help="Auto-confirm instruction injection without an interactive prompt",
388 )
389 # Legacy flags (kept for backwards compat, now no-ops since all is default)
390 install_cmd.add_argument("--skills", action="store_true", help=argparse.SUPPRESS)
391 install_cmd.add_argument("--hooks", action="store_true", help=argparse.SUPPRESS)
392 install_cmd.add_argument(
393 "--all", action="store_true", dest="install_all", help=argparse.SUPPRESS
394 )
395 install_cmd.add_argument(
396 "--platform",
397 choices=_PLATFORM_CHOICES,
398 default="all",
399 help="Target platform for MCP config (default: all detected)",
400 )
401
402 init_cmd = sub.add_parser("init", help="Alias for install")
403 init_cmd.add_argument("--repo", default=None, help="Repository root (auto-detected)")
404 init_cmd.add_argument(
405 "--dry-run",
406 action="store_true",
407 help="Show what would be done without writing files",
408 )

Callers

nothing calls this directly

Calls 15

registerMethod · 0.95
unregisterMethod · 0.95
list_reposMethod · 0.95
closeMethod · 0.95
get_statsMethod · 0.95
get_metadataMethod · 0.95
_get_versionFunction · 0.85
_print_bannerFunction · 0.85
generate_full_reportFunction · 0.85
generate_readme_tablesFunction · 0.85
run_evalFunction · 0.85
_handle_initFunction · 0.85

Tested by

no test coverage detected