argparse turns sys.argv into typed values. It supports subcommands, choices and mutually exclusive groups, builds the --help text for you, and on a usage error prints a message to stderr and exits with status 2.