MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / registry_download

Function registry_download

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

794
795@registry_app.command("download")
796def registry_download(
797 name: str = typer.Argument(..., help="Bundle name to download (e.g., 'numpy')"),
798 output_dir: Optional[str] = typer.Option(None, "--output", "-o", help="Output directory (default: current directory)"),
799 load: bool = typer.Option(False, "--load", "-l", help="Automatically load the bundle after downloading")
800):
801 """
802 Download a bundle from the registry.
803
804 Downloads the specified bundle to the current directory or specified output directory.
805 Use --load to automatically import the bundle after downloading.
806
807 Examples:
808 cgc registry download numpy
809 cgc registry download pandas --output ./bundles
810 cgc registry download fastapi --load
811 """
812 from .registry_commands import download_bundle
813
814 bundle_path = download_bundle(name, output_dir, auto_load=load)
815
816 if load and bundle_path:
817 console.print(f"\n[cyan]Loading bundle...[/cyan]")
818 bundle_import(bundle_path, clear=False)
819
820@registry_app.command("request")
821def registry_request(

Callers

nothing calls this directly

Calls 2

download_bundleFunction · 0.85
bundle_importFunction · 0.85

Tested by

no test coverage detected