def list_command()

in composer_local_dev/cli.py [0:0]


def list_command(verbose: bool, debug: bool):
    """
    Print list of the Composer environments found in the current directory.
    """
    utils.setup_logging(verbose, debug)
    current_path = pathlib.Path.cwd().resolve()
    envs = files.get_environment_directories()
    environments_status = composer_environment.get_environments_status(envs)
    if environments_status:
        console.get_console().print(
            constants.ENVIRONMENTS_FOUND.format(path=current_path)
        )
        table = utils.get_environment_status_table(environments_status)
        console.get_console().print(table)
        console.get_console().print(constants.LIST_COMMAND_EPILOG)
    else:
        console.get_console().print(
            constants.ENVIRONMENTS_NOT_FOUND.format(path=current_path)
        )