code: def cli(ctx, ids, query, filters, details, interval):
      
      if details:
          display = 'details'
      else:
          display = 'compact'
      from_date = None
  
      auto_refresh = True
      while auto_refresh:
          try:
              auto_refresh, from_date = ctx.invoke(query_cmd, ids=ids, query=query,
                                                   filters=filters, display=display, from_date=from_date)
              time.sleep(interval)
          except (KeyboardInterrupt, SystemExit) as e:
              sys.exit(e)
docs: Watch for new alerts.