code: func newConnectCmd() *subcommands.Command {
  	return &subcommands.Command{
  		UsageLine: "connect -dir <path> -server <server> -user <name>",
  		ShortDesc: "connects to a swarming server",
  		LongDesc:  "Connects to a Swarming server.",
  		CommandRun: func() subcommands.CommandRun {
  			cmd := &connectCmd{}
  			cmd.Initialize()
  			cmd.Flags.StringVar(&cmd.dir, "dir", "", "Path to use as the Swarming bot directory.")
  			cmd.Flags.StringVar(&cmd.provider, "provider", "", "Provider server URL to retrieve Swarming server URL from.")
  			cmd.Flags.StringVar(&cmd.server, "server", "", "Deprecated. Use -provider.")
  			cmd.Flags.StringVar(&cmd.user, "user", "", "Name of the local user to start the Swarming bot process as.")
  			return cmd
  		},
  	}
  }
docs: // newConnectCmd returns a new command to connect to a Swarming server.