code: def cli_main():  # pragma: no cover
      
      if '--debug' in sys.argv:
          LOG.setLevel(logging.DEBUG)
      elif '--verbose' in sys.argv:
          LOG.setLevel(logging.INFO)
  
      args = _get_arguments()
      try:
          plugin, folder = get_plugin_and_folder(
              inputzip=args.inputzip,
              inputdir=args.inputdir,
              inputfile=args.inputfile)
          LOG.debug('Plugin: %s -- Folder: %s' % (plugin.name, folder))
          run_mq2(
              plugin, folder, lod_threshold=args.lod, session=args.session)
      except MQ2Exception as err:
          print(err)
          return 1
      return 0
docs: Main function when running from CLI.