code: func (r *baseCommandRun) initClients(ctx context.Context) error {
  	// Create HTTP Client.
  	authOpts, err := r.authFlags.Options()
  	if err != nil {
  		return err
  	}
  	r.httpClient, err = auth.NewAuthenticator(ctx, auth.SilentLogin, authOpts).Client()
  	if err != nil {
  		return err
  	}
  
  	// Validate -host
  	if r.host == "" {
  		return fmt.Errorf("a host for the buildbucket service must be provided")
  	}
  	if strings.ContainsRune(r.host, '/') {
  		return fmt.Errorf("invalid host %q", r.host)
  	}
  
  	// Create Buildbucket client.
  	rpcOpts := prpc.DefaultOptions()
  	rpcOpts.Insecure = lhttp.IsLocalHost(r.host)
  	info, err := version.GetCurrentVersion()
  	if err != nil {
  		return err
  	}
  	rpcOpts.UserAgent = fmt.Sprintf("buildbucket CLI, instanceID=%q", info.InstanceID)
  	r.client = pb.NewBuildsPRPCClient(&prpc.Client{
  		C:       r.httpClient,
  		Host:    r.host,
  		Options: rpcOpts,
  	})
  	return nil
  }
docs: // initClients validates -host flag and initializes r.httpClient and r.client.