docs: def run(**kwargs):
      """Run the Therapist suite."""
      paths = kwargs.pop('paths', ())
      action = kwargs.pop('action')
      plugin = kwargs.pop('plugin')
      junit_xml = kwargs.pop('junit_xml')
      use_tracked_files = kwargs.pop('use_tracked_files')
      quiet = kwargs.pop('quiet')
  
      colorama.init(strip=kwargs.pop('no_color'))
  
      git_dir = current_git_dir()
  
      if git_dir is None:
          output(NOT_GIT_REPO_MSG)
          exit(1)
  
      repo_root = os.path.dirname(git_dir)
  
      files = []
      if paths:
          # We want to look at files in their current state if paths are passed through
          kwargs['include_unstaged_changes'] = True
  
          # If paths were provided get all the files for each path
          for path in paths:
              for f in list_files(path):
                  f = os.path.relpath(f, repo_root)
                  if not f.startswith('..'):  # Don't include files outside the repo root.
                      files.append(f)
      elif use_tracked_files:
          # If the use tracked files flag was passed, get a list of all the tracked files
          out, err, code = git.ls_files()
          files = out.splitlines()
  
          if kwargs.get('include_untracked'):
              out, err, code = git.ls_files(o=True, exclude_standard=True)
              files += out.splitlines()
  
      if files or paths:
          kwargs['files'] = files
  
      config = get_config(repo_root)
      runner = Runner(config.cwd, **kwargs)
      results = ResultCollection()
  
      if runner.unstaged_changes and not quiet:
          output(UNSTAGED_CHANGES_MSG, end='\n\n')
  
      processes = list(config.actions) + list(config.plugins)
      processes.sort(key=lambda x: x.name)  # Sort the list of processes for consistent results
  
      if plugin:
          try:
              processes = [config.plugins.get(plugin)]
          except config.plugins.DoesNotExist as e:
              output('{}\nAvailable plugins:'.format(e.message))
  
              for p in config.plugins:
                  output(p.name)
              exit(1)
  
      if action:
          try:
              processes = [config.actions.get(action)]
          except config.actions.DoesNotExist as e:
              output('{}\nAvailable actions:'.format(e.message))
  
              for a in config.actions:
                  output(a.name)
              exit(1)
  
      for process in processes:
          result, message = runner.run_process(process)
          results.append(result)
  
          if not quiet:
              output(message)
  
      if junit_xml:
          with open(junit_xml, 'w+') as f:
              f.write('{}'.format(results.dump_junit()))
  
      if not quiet:
          output(results.dump())
          output('#{{bright}}{}\nCompleted in: {}s'.format(''.ljust(79, '-'), round(results.execution_time, 2)))
  
      if results.has_error:
          exit(1)
      elif results.has_failure:
          exit(2)