code: func Cmd(params base.Parameters) *subcommands.Command {
  	return &subcommands.Command{
  		UsageLine: "generate SCRIPT",
  		ShortDesc: "interprets a high-level config, generating *.cfg files",
  		LongDesc: `Interprets a high-level config, generating *.cfg files.
  
  Writes generated configs to the directory given via -config-dir or via
  lucicfg.config(config_dir=...) statement in the script. If it is '-', just
  prints them to stdout.
  
  If -validate is given, sends the generated config to LUCI Config service for
  validation. This can also be done separately via 'validate' subcommand.
  
  If the generation stage fails, doesn't overwrite any files on disk. If the
  generation succeeds, but the validation fails, the new generated files are kept
  on disk, so they can be manually examined for reasons they are invalid.
  `,
  		CommandRun: func() subcommands.CommandRun {
  			gr := &generateRun{}
  			gr.Init(params)
  			gr.AddMetaFlags()
  			gr.Flags.BoolVar(&gr.validate, "validate", false, "Validate the generate configs by sending them to LUCI Config")
  			return gr
  		},
  	}
  }
docs: // Cmd is 'generate' subcommand.