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")
)
| 1103 | |
| 1104 | @registry_app.command("download") |
| 1105 | def 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") |
| 1130 | def registry_request( |
nothing calls this directly
no test coverage detected