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

Function workflow_catalog_add

src/specify_cli/workflows/_commands.py:1009–1024  ·  view source on GitHub ↗

Add a workflow catalog source.

(
    url: str = typer.Argument(..., help="Catalog URL to add"),
    name: str | None = typer.Option(None, "--name", help="Catalog name"),
)

Source from the content-addressed store, hash-verified

1007
1008@workflow_catalog_app.command("add")
1009def workflow_catalog_add(
1010 url: str = typer.Argument(..., help="Catalog URL to add"),
1011 name: str | None = typer.Option(None, "--name", help="Catalog name"),
1012):
1013 """Add a workflow catalog source."""
1014 from .catalog import WorkflowCatalog, WorkflowValidationError
1015
1016 project_root = _require_specify_project()
1017 catalog = WorkflowCatalog(project_root)
1018 try:
1019 catalog.add_catalog(url, name)
1020 except WorkflowValidationError as exc:
1021 console.print(f"[red]Error:[/red] {exc}")
1022 raise typer.Exit(1)
1023
1024 console.print(f"[green]✓[/green] Catalog source added: {url}")
1025
1026
1027@workflow_catalog_app.command("remove")

Callers

nothing calls this directly

Calls 4

add_catalogMethod · 0.95
WorkflowCatalogClass · 0.85
printMethod · 0.80
_require_specify_projectFunction · 0.70

Tested by

no test coverage detected