MCPcopy Index your code
hub / github.com/github/copilot-sdk / main

Function main

python/copilot/_cli_download.py:340–386  ·  view source on GitHub ↗

CLI entry point for `python -m copilot download-runtime`.

()

Source from the content-addressed store, hash-verified

338
339
340def main() -> None:
341 """CLI entry point for `python -m copilot download-runtime`."""
342 import argparse
343
344 parser = argparse.ArgumentParser(
345 prog="python -m copilot",
346 description="Copilot SDK utilities",
347 )
348 subparsers = parser.add_subparsers(dest="command")
349
350 # download-runtime subcommand
351 dl_parser = subparsers.add_parser(
352 "download-runtime",
353 help="Download the Copilot runtime",
354 )
355 dl_parser.add_argument(
356 "--force",
357 action="store_true",
358 help="Re-download even if already cached",
359 )
360 dl_parser.add_argument(
361 "--version",
362 help="Runtime version to download (default: pinned version)",
363 )
364
365 args = parser.parse_args()
366
367 if args.command == "download-runtime":
368 ver = args.version or CLI_VERSION
369 if not ver:
370 print(
371 "Error: No runtime version pinned (development install). "
372 "Use --version to specify a version.",
373 file=sys.stderr,
374 )
375 sys.exit(1)
376
377 print(f"Downloading Copilot runtime v{ver}...")
378 try:
379 path = download_cli(ver, force=args.force)
380 print(f"Runtime cached at: {path}")
381 except RuntimeError as exc:
382 print(f"Error: {exc}", file=sys.stderr)
383 sys.exit(1)
384 else:
385 parser.print_help()
386 sys.exit(1)

Callers

nothing calls this directly

Calls 1

download_cliFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…