code: def monitor(args, watch):
      
      watch = watch if isinstance(watch, (list, tuple)) else [watch]
      watch = [Path(entry).expand().abspath() for entry in watch]
      event_handler = RunScriptChangeHandler(args)
      observer = Observer()
      for entry in watch:
          if entry.isfile():
              entry = entry.parent
          click.secho('watch recursive: {0}'.format(entry), fg='blue')
          observer.schedule(event_handler, entry, recursive=True)
      event_handler.run()  # run always once
      observer.start()
  
      try:
          while True:
              time.sleep(1)
      except KeyboardInterrupt:
          observer.stop()
      observer.join()
docs: reloads the script given by argv when src files changes