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

Function registry_download

src/codegraphcontext/cli/main.py:1005–1027  ·  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

1003
1004@registry_app.command("download")
1005def registry_download(
1006 name: str = typer.Argument(..., help="Bundle name to download (e.g., 'numpy')"),
1007 output_dir: Optional[str] = typer.Option(None, "--output", "-o", help="Output directory (default: current directory)"),
1008 load: bool = typer.Option(False, "--load", "-l", help="Automatically load the bundle after downloading")
1009):
1010 """
1011 Download a bundle from the registry.
1012
1013 Downloads the specified bundle to the current directory or specified output directory.
1014 Use --load to automatically import the bundle after downloading.
1015
1016 Examples:
1017 cgc registry download numpy
1018 cgc registry download pandas --output ./bundles
1019 cgc registry download fastapi --load
1020 """
1021 from .registry_commands import download_bundle
1022
1023 bundle_path = download_bundle(name, output_dir, auto_load=load)
1024
1025 if load and bundle_path:
1026 console.print("\n[cyan]Loading bundle...[/cyan]")
1027 bundle_import(bundle_path, clear=False)
1028
1029@registry_app.command("request")
1030def 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