def list_components()

in solutions_builder/cli/component.py [0:0]


def list_components(solution_path: Annotated[Optional[str], typer.Argument()] = "."):
  """List installed components."""
  sb_yaml = read_yaml(f"{solution_path}/sb.yaml")
  components = sb_yaml.get("components", [])
  print("Installed components:")
  for component_name, properties in components.items():
    typer.echo(
        typer.style(f"- {component_name} ", fg=typer.colors.WHITE, bold=True) +
        typer.style(f"(template: {properties['template_path']})",
                    fg=typer.colors.BLACK,
                    bold=True))
  print()