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")
)
| 794 | |
| 795 | @registry_app.command("download") |
| 796 | def 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") |
| 821 | def registry_request( |
nothing calls this directly
no test coverage detected