code: def main(*argv, 
            filesystem=None, 
            do_exit=True,
            stdout=None,
            stderr=None):
      
      try:
          mdcli = MdCLI()
          mdcli.filesystem = filesystem
          mdcli.stdout = stdout or sys.stdout
          mdcli.stderr = stderr or sys.stderr
          retval = mdcli.main(*argv, loop=LOOP_NEVER)
          if do_exit:
              sys.exit(retval)
          else:
              return retval
      except KeyboardInterrupt:
          pass
docs: Main method for the cli.
  
      We allow the filesystem to be overridden for test purposes.