Ensure the project is initialized (idempotent), then optionally install a bundle.
(
bundle: str = typer.Argument(None, help="Optional bundle to install after init"),
integration: str = typer.Option(None, "--integration", help="Integration override"),
offline: bool = typer.Option(False, "--offline", help="Do not access the network"),
)
| 536 | |
| 537 | @bundle_app.command("init") |
| 538 | def bundle_init( |
| 539 | bundle: str = typer.Argument(None, help="Optional bundle to install after init"), |
| 540 | integration: str = typer.Option(None, "--integration", help="Integration override"), |
| 541 | offline: bool = typer.Option(False, "--offline", help="Do not access the network"), |
| 542 | ) -> None: |
| 543 | """Ensure the project is initialized (idempotent), then optionally install a bundle.""" |
| 544 | from ...bundler.lib.project import find_project_root |
| 545 | |
| 546 | try: |
| 547 | project_root = find_project_root() |
| 548 | if project_root is None: |
| 549 | init_integration = _resolve_init_integration(integration, None) |
| 550 | console.print( |
| 551 | f"[cyan]Initializing a Spec Kit project with integration " |
| 552 | f"'{init_integration}'…[/cyan]" |
| 553 | ) |
| 554 | _run_init(init_integration, script_type=_default_script_type(), offline=offline) |
| 555 | project_root = require_project_root() |
| 556 | except BundlerError as exc: |
| 557 | _fail(str(exc)) |
| 558 | return |
| 559 | |
| 560 | console.print(f"[green]✓[/green] Spec Kit project ready at {project_root}.") |
| 561 | if bundle: |
| 562 | bundle_install(bundle, integration=integration, offline=offline) |
| 563 | |
| 564 | |
| 565 | # ===== Catalog management ===== |
nothing calls this directly
no test coverage detected