Show catalog details for a single integration.
(
integration_id: str = typer.Argument(..., help="Integration ID"),
)
| 354 | |
| 355 | @integration_app.command("info") |
| 356 | def integration_info( |
| 357 | integration_id: str = typer.Argument(..., help="Integration ID"), |
| 358 | ): |
| 359 | """Show catalog details for a single integration.""" |
| 360 | from . import INTEGRATION_REGISTRY |
| 361 | from .catalog import ( |
| 362 | IntegrationCatalog, |
| 363 | IntegrationCatalogError, |
| 364 | IntegrationValidationError, |
| 365 | ) |
| 366 | from .. import _require_specify_project |
| 367 | |
| 368 | project_root = _require_specify_project() |
| 369 | catalog = IntegrationCatalog(project_root) |
| 370 | installed_key = _default_integration_key(_read_integration_json(project_root)) |
| 371 | |
| 372 | try: |
| 373 | info = catalog.get_integration_info(integration_id) |
| 374 | except IntegrationCatalogError as exc: |
| 375 | info = None |
| 376 | # Keep the live exception so the fallback branch below can give |
| 377 | # different guidance for local-config vs. network failures. |
| 378 | catalog_error: Optional[IntegrationCatalogError] = exc |
| 379 | else: |
| 380 | catalog_error = None |
| 381 | |
| 382 | if info: |
| 383 | name = info.get("name", integration_id) |
| 384 | version = info.get("version", "?") |
| 385 | console.print(f"\n[bold cyan]{name}[/bold cyan] ({integration_id}) v{version}") |
| 386 | if info.get("description"): |
| 387 | console.print(f" {info['description']}") |
| 388 | console.print() |
| 389 | |
| 390 | console.print(f" [dim]Author:[/dim] {info.get('author', 'Unknown')}") |
| 391 | if info.get("license"): |
| 392 | console.print(f" [dim]License:[/dim] {info['license']}") |
| 393 | |
| 394 | tags = info.get("tags", []) |
| 395 | if isinstance(tags, list) and tags: |
| 396 | console.print(f" [dim]Tags:[/dim] {', '.join(str(t) for t in tags)}") |
| 397 | |
| 398 | cat_name = info.get("_catalog_name", "") |
| 399 | install_allowed = info.get("_install_allowed", True) |
| 400 | if cat_name: |
| 401 | install_note = "" if install_allowed else " [yellow](discovery only)[/yellow]" |
| 402 | console.print(f" [dim]Source catalog:[/dim] {cat_name}{install_note}") |
| 403 | |
| 404 | if info.get("repository"): |
| 405 | console.print(f" [dim]Repository:[/dim] {info['repository']}") |
| 406 | |
| 407 | if integration_id == installed_key: |
| 408 | console.print("\n [green]✓ Installed[/green] (currently active)") |
| 409 | elif integration_id in INTEGRATION_REGISTRY: |
| 410 | console.print("\n [dim]Built-in integration (not currently active)[/dim]") |
| 411 | return |
| 412 | |
| 413 | if integration_id in INTEGRATION_REGISTRY: |
nothing calls this directly
no test coverage detected