"""Command line entry point for the development-side tools. Each group of commands lives in its own module and registers itself here: - exe_commands: check-patches, patch-exe - gui_commands: check-gui Run `wtotools --help` for the arguments of one command. """ from __future__ import annotations import argparse from . import exe_commands, gui_commands def main(argv: list[str] | None = None) -> int: parser = argparse.ArgumentParser(prog="wtotools", description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) commands = parser.add_subparsers(dest="command", required=True) for group in (exe_commands, gui_commands): group.register(commands) args = parser.parse_args(argv) return args.handler(args)