code: func NewEventsCommand(dockerCli command.Cli) *cobra.Command {
  	options := eventsOptions{filter: opts.NewFilterOpt()}
  
  	cmd := &cobra.Command{
  		Use:   "events [OPTIONS]",
  		Short: "Get real time events from the server",
  		Args:  cli.NoArgs,
  		RunE: func(cmd *cobra.Command, args []string) error {
  			return runEvents(dockerCli, &options)
  		},
  	}
  
  	flags := cmd.Flags()
  	flags.StringVar(&options.since, "since", "", "Show all events created since timestamp")
  	flags.StringVar(&options.until, "until", "", "Stream events until this timestamp")
  	flags.VarP(&options.filter, "filter", "f", "Filter output based on conditions provided")
  	flags.StringVar(&options.format, "format", "", "Format the output using the given Go template")
  
  	return cmd
  }
docs: // NewEventsCommand creates a new cobra.Command for `docker events`