MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / registry_download

Function registry_download

src/codegraphcontext/cli/main.py:1105–1127  ·  view source on GitHub ↗

Download a bundle from the registry. Downloads the specified bundle to the current directory or specified output directory. Use --load to automatically import the bundle after downloading. Examples: cgc registry download numpy cgc registry download pandas -

(
    name: str = typer.Argument(..., help="Bundle name to download (e.g., 'numpy')"),
    output_dir: Optional[str] = typer.Option(None, "--output", "-o", help="Output directory (default: current directory)"),
    load: bool = typer.Option(False, "--load", "-l", help="Automatically load the bundle after downloading")
)

Source from the content-addressed store, hash-verified

1103
1104@registry_app.command("download")
1105def registry_download(
1106 name: str = typer.Argument(..., help="Bundle name to download (e.g., 'numpy')"),
1107 output_dir: Optional[str] = typer.Option(None, "--output", "-o", help="Output directory (default: current directory)"),
1108 load: bool = typer.Option(False, "--load", "-l", help="Automatically load the bundle after downloading")
1109):
1110 """
1111 Download a bundle from the registry.
1112
1113 Downloads the specified bundle to the current directory or specified output directory.
1114 Use --load to automatically import the bundle after downloading.
1115
1116 Examples:
1117 cgc registry download numpy
1118 cgc registry download pandas --output ./bundles
1119 cgc registry download fastapi --load
1120 """
1121 from .registry_commands import download_bundle
1122
1123 bundle_path = download_bundle(name, output_dir, auto_load=load)
1124
1125 if load and bundle_path:
1126 console.print("\n[cyan]Loading bundle...[/cyan]")
1127 bundle_import(bundle_path, clear=False, yes=False, context=None)
1128
1129@registry_app.command("request")
1130def registry_request(

Callers

nothing calls this directly

Calls 3

download_bundleFunction · 0.85
bundle_importFunction · 0.85
printMethod · 0.80

Tested by

no test coverage detected