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")
)
| 1003 | |
| 1004 | @registry_app.command("download") |
| 1005 | def 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") |
| 1030 | def registry_request( |
nothing calls this directly
no test coverage detected