def cli()

in generator/__init__.py [0:0]


def cli(prog_name=None):
    """Generate and run CLI."""
    if not is_authenticated():
        print(
            "Authentication to GCP required. Run `gcloud auth login --update-adc` "
            "and check that the project is set correctly."
        )
        sys.exit(1)

    commands = {
        "namespaces": namespaces,
        "lookml": lookml,
        "update-spoke": update_spoke,
    }

    @click.group(commands=commands)
    def group():
        """CLI interface for lookml automation."""

    warnings.filterwarnings(
        "ignore",
        "Your application has authenticated using end user credentials",
        module="google.auth._default",
    )

    group(prog_name=prog_name)