def get_cli_parser(called_as_console_script: bool = True) -> ArgumentParser:
    """Get the CLI parser for Olive.

    :param called_as_console_script: Whether the script was called as a console script.
    :return: The CLI parser.
    """
    parser = ArgumentParser("Olive CLI tool", usage="olive" if called_as_console_script else "python -m olive")
    commands_parser = parser.add_subparsers()

    # Register commands
    # TODO(jambayk): Consider adding a common tempdir option to all commands
    # NOTE: The order of the commands is to organize the documentation better.
    WorkflowRunCommand.register_subcommand(commands_parser)
    AutoOptCommand.register_subcommand(commands_parser)
    CaptureOnnxGraphCommand.register_subcommand(commands_parser)
    FineTuneCommand.register_subcommand(commands_parser)
    GenerateAdapterCommand.register_subcommand(commands_parser)
    ConvertAdaptersCommand.register_subcommand(commands_parser)
    QuantizeCommand.register_subcommand(commands_parser)
    SessionParamsTuningCommand.register_subcommand(commands_parser)
    GenerateCostModelCommand.register_subcommand(commands_parser)
    ConfigureQualcommSDKCommand.register_subcommand(commands_parser)
    ManageAMLComputeCommand.register_subcommand(commands_parser)
    SharedCacheCommand.register_subcommand(commands_parser)
    ExtractAdaptersCommand.register_subcommand(commands_parser)

    return parser
Get the CLI parser for Olive.

    :param called_as_console_script: Whether the script was called as a console script.
    :return: The CLI parser.
    
olive/cli/launcher.py