(cli_parser)
Adds the main CLI options.

    :param ArgumentParser cli_parser: An :class:`ArgumentParser` instance.
Adds the main CLI options.
Adds the main CLI options .
def add_main_cli(cli_parser):
    """Adds the main CLI options.

    :param ArgumentParser cli_parser: An :class:`ArgumentParser` instance.
    """
    cli_parser.add_argument(
        "--list",
        help="List supported devices and exit",
        nargs=0,
        action=PrintSupportedDevicesAction,
    )

    cli_parser.add_argument(
        "--version",
        action="version",
        version=VERSION,
    )

    cli_parser.add_argument(
        "--no-save",
        help="Do not persist settings in the internal device memory",
        dest="SAVE",
        action="store_false",
        default=True,
    )

    cli_parser.add_argument(
        "--update-udev",
        help="Updates udev rules (Linux only, requires to be run as root)",
        nargs=0,
        action=UpdateUdevRulesAction,
    )

    cli_parser.add_argument(
        "--print-udev",
        help="Prints udev rules and exit",
        nargs=0,
        action=PrintUdevRulesAction,
    )

    cli_parser.add_argument(
        "--print-debug",
        help="Prints debug informations and exit",
        nargs=0,
        action=PrintDebugAction,
    )
def add_main_cli ( cli_parser ) : cli_parser . add_argument ( "--list" , help = "List supported devices and exit" , nargs = 0 , action = PrintSupportedDevicesAction , ) cli_parser . add_argument ( "--version" , action = "version" , version = VERSION , ) cli_parser . add_argument ( "--no-save" , help = "Do not persist settings in the internal device memory" , dest = "SAVE" , action = "store_false" , default = True , ) cli_parser . add_argument ( "--update-udev" , help = "Updates udev rules (Linux only, requires to be run as root)" , nargs = 0 , action = UpdateUdevRulesAction , ) cli_parser . add_argument ( "--print-udev" , help = "Prints udev rules and exit" , nargs = 0 , action = PrintUdevRulesAction , ) cli_parser . add_argument ( "--print-debug" , help = "Prints debug informations and exit" , nargs = 0 , action = PrintDebugAction , )