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

Function integration_list

src/specify_cli/integrations/_query_commands.py:27–123  ·  view source on GitHub ↗

List available integrations and installed status.

(
    catalog: bool = typer.Option(False, "--catalog", help="Browse full catalog (built-in + community)"),
)

Source from the content-addressed store, hash-verified

25
26@integration_app.command("list")
27def integration_list(
28 catalog: bool = typer.Option(False, "--catalog", help="Browse full catalog (built-in + community)"),
29):
30 """List available integrations and installed status."""
31 from . import INTEGRATION_REGISTRY
32 from .. import _require_specify_project
33
34 project_root = _require_specify_project()
35 current = _read_integration_json(project_root)
36 default_key = _default_integration_key(current)
37 installed_keys = set(_installed_integration_keys(current))
38
39 if catalog:
40 from .catalog import IntegrationCatalog, IntegrationCatalogError
41
42 ic = IntegrationCatalog(project_root)
43 try:
44 entries = ic.search()
45 except IntegrationCatalogError as exc:
46 console.print(f"[red]Error:[/red] {exc}")
47 raise typer.Exit(1)
48
49 if not entries:
50 console.print("[yellow]No integrations found in catalog.[/yellow]")
51 return
52
53 table = Table(title="Integration Catalog")
54 table.add_column("ID", style="cyan")
55 table.add_column("Name")
56 table.add_column("Version")
57 table.add_column("Source")
58 table.add_column("Status")
59 table.add_column("Multi-install Safe")
60
61 for entry in sorted(entries, key=lambda e: e["id"]):
62 eid = entry["id"]
63 cat_name = entry.get("_catalog_name", "")
64 install_allowed = entry.get("_install_allowed", True)
65 if eid == default_key:
66 status = "[green]installed (default)[/green]"
67 elif eid in installed_keys:
68 status = "[green]installed[/green]"
69 elif eid in INTEGRATION_REGISTRY:
70 status = "built-in"
71 elif install_allowed is False:
72 status = "discovery-only"
73 else:
74 status = ""
75 safe = ""
76 if eid in INTEGRATION_REGISTRY:
77 reg_integ = INTEGRATION_REGISTRY[eid]
78 safe = "yes" if getattr(reg_integ, "multi_install_safe", False) else "no"
79 table.add_row(
80 eid,
81 entry.get("name", eid),
82 entry.get("version", ""),
83 cat_name,
84 status,

Callers

nothing calls this directly

Calls 7

searchMethod · 0.95
_read_integration_jsonFunction · 0.85
IntegrationCatalogClass · 0.85
printMethod · 0.80
_require_specify_projectFunction · 0.50
getMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected