


'''simple docstring'''
import argparse

from .config import config_command_parser
from .config_args import default_config_file, load_config_from_file  # noqa: F401
from .default import default_command_parser
from .update import update_command_parser


def       a				(      __a=None       )  ->     List[str]:



					'''simple docstring'''






					UpperCamelCase__       :Optional[Any]							 =			argparse.ArgumentParser(add_help=__a			, allow_abbrev=__a       )
					# The main config parser
					UpperCamelCase__       :str							 =			config_command_parser(__a       )
					# The subparser to add commands to
					UpperCamelCase__       :Union[str, Any]							 =			config_parser.add_subparsers(title='''subcommands'''			, dest='''subcommand'''       )

					# Then add other parsers with the parent parser
					default_command_parser(__a			, parents=[parent_parser]       )
					update_command_parser(__a			, parents=[parent_parser]       )

					return config_parser


def       a				(      )  ->     Any:



					'''simple docstring'''






					UpperCamelCase__       :int							 =			get_config_parser()
					UpperCamelCase__       :List[Any]							 =			config_parser.parse_args()

					if not hasattr(__a			, '''func'''       ):
										config_parser.print_help()
										exit(1       )

					# Run
					args.func(__a       )


if __name__ == "__main__":
		main()



'''simple docstring'''
from argparse import ArgumentParser

from .env import EnvironmentCommand


def       a				(      )  ->     Union[str, Any]:



					'''simple docstring'''






					UpperCamelCase__       :Union[str, Any]							 =			ArgumentParser('''Diffusers CLI tool'''			, usage='''diffusers-cli <command> [<args>]'''       )
					UpperCamelCase__       :Union[str, Any]							 =			parser.add_subparsers(help='''diffusers-cli command helpers'''       )

					# Register commands
					EnvironmentCommand.register_subcommand(__a       )

					# Let's go
					UpperCamelCase__       :Optional[int]							 =			parser.parse_args()

					if not hasattr(__a			, '''func'''       ):
										parser.print_help()
										exit(1       )

					# Run
					UpperCamelCase__       :Optional[int]							 =			args.func(__a       )
					service.run()


if __name__ == "__main__":
		main()