MCPcopy Index your code
hub / github.com/github/spec-kit / bundle_init

Function bundle_init

src/specify_cli/commands/bundle/__init__.py:538–562  ·  view source on GitHub ↗

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"),
)

Source from the content-addressed store, hash-verified

536
537@bundle_app.command("init")
538def 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 =====

Callers

nothing calls this directly

Calls 8

find_project_rootFunction · 0.85
_default_script_typeFunction · 0.85
require_project_rootFunction · 0.85
_failFunction · 0.85
bundle_installFunction · 0.85
printMethod · 0.80
_run_initFunction · 0.70

Tested by

no test coverage detected