docs: def run(self, argv):
          """Application entry point"""
          try:
              self.options, remainder = self.parser.parse_known_args(argv)
              self._configure_logging()
  
              if self.options.relative_plugins:
                  curdir = os.getcwd()
                  sys.path.insert(0, curdir)
                  pkg_resources.working_set.add_entry(curdir)
  
  
              try:
                  self._load_commands_for_current_dir()
              except pkg_resources.DistributionNotFound as e:
                  try:
                      error_msg = repr(e)
                  except:
                      error_msg = 'Unknown Error'
  
                  log.error('Failed to load project commands with error '
                            '``%s``, have you installed your project?' % error_msg)
  
          except Exception as err:
              if hasattr(self, 'options'):
                  debug = self.options.debug
              else:
                  debug = True
  
              if debug:
                  log.exception(err)
              else:
                  log.error(err)
  
              return 1
  
          return self._run_subcommand(remainder)