def list_models_main():
    # type: () -> int
    """
    Run list_models as a main program.  See :func:`list_models` for the
    kinds of models that can be requested on the command line.
    """
    import sys
    kind = sys.argv[1] if len(sys.argv) > 1 else "all"
    try:
        models = list_models(kind)
        print("\n".join(models))
    except Exception:
        print(list_models.__doc__)
        return 1
    return 0