Repository: apache/kafka
File: core/src/main/scala/kafka/tools/StorageTool.scala (Scala)

Code before:
    formatParser.addArgument("--ignore-formatted", "-g")
      .help("When this option is passed, the format command will skip over already formatted directories rather than failing.")
      .action(storeTrue())

    formatParser.addArgument("--release-version", "-r")
      .action(store())
      .help(s"The release version to use for the initial feature settings. The minimum is " +
        s"${MetadataVersion.MINIMUM_VERSION}; the default is ${MetadataVersion.LATEST_PRODUCTION}")

    formatParser.addArgument("--feature", "-f")
      .help("The setting to use for a specific feature, in feature=level format. For example: `kraft.version=1`.")
      .action(append())

    val reconfigurableQuorumOptions = formatParser.addMutuallyExclusiveGroup()
    reconfigurableQuorumOptions.addArgument("--standalone", "-s")
      .help("Used to initialize a controller as a single-node dynamic quorum. When setting this flag, " +
        "the controller.quorum.voters config must not be set, and controller.quorum.bootstrap.servers is set instead.")
      .action(storeTrue())

    reconfigurableQuorumOptions.addArgument("--no-initial-controllers", "-N")
      .help("Used to initialize a controller without specifying a dynamic quorum. When setting this flag, " +
        "the controller.quorum.voters config should not be set, and controller.quorum.bootstrap.servers is set instead.")
      .action(storeTrue())

    reconfigurableQuorumOptions.addArgument("--initial-controllers", "-I")
      .help("Used to initialize a controller with the specified dynamic quorum. The argument " +
        "is a comma-separated list of id@hostname:port:directory. The same values must be used to " +
        "format all nodes. For example:\n0@example.com:8082:JEXY6aqzQY-32P5TStzaFg,1@example.com:8083:" +
        "MvDxzVmcRsaTz33bUuRU6A,2@example.com:8084:07R5amHmR32VDA6jHkGbTA\n. When setting this flag, " +
        "the controller.quorum.voters config must not be set, and controller.quorum.bootstrap.servers is set instead.")
      .action(store())
  }

  private def addVersionMappingParser(subparsers: Subparsers): Unit = {
    val versionMappingParser = subparsers.addParser("version-mapping")
      .help("Look up the corresponding features for a given metadata version. " +
        "Using the command with no --release-version  argument will return the mapping for " +
        "the latest stable metadata version"
      )

    versionMappingParser.addArgument("--release-version", "-r")
      .action(store())
      .help(s"The release version to use for the corresponding feature mapping. The minimum is " +
        s"${MetadataVersion.MINIMUM_VERSION}; the default is ${MetadataVersion.LATEST_PRODUCTION}")
  }

  private def addFeatureDependenciesParser(subparsers: Subparsers): Unit = {
    val featureDependenciesParser = subparsers.addParser("feature-dependencies")
      .help("Look up dependencies for a given feature version. " +
        "If the feature is not known or the version not yet defined, an error is thrown. " +
        "Multiple features can be specified."

Review comment (suggestion):
--standalone can only be used on the controller node but --no-initial-controllers and --initial-controllers can be used in the controller and broker nodes.

I.e. you can change the message back to using the word server instead of the word controller.

Code after:
    formatParser.addArgument("--ignore-formatted", "-g")
      .help("When this option is passed, the format command will skip over already formatted directories rather than failing.")
      .action(storeTrue())

    formatParser.addArgument("--release-version", "-r")
      .action(store())
      .help(s"The release version to use for the initial feature settings. The minimum is " +
        s"${MetadataVersion.MINIMUM_VERSION}; the default is ${MetadataVersion.LATEST_PRODUCTION}")

    formatParser.addArgument("--feature", "-f")
      .help("The setting to use for a specific feature, in feature=level format. For example: `kraft.version=1`.")
      .action(append())

    val reconfigurableQuorumOptions = formatParser.addMutuallyExclusiveGroup()
    reconfigurableQuorumOptions.addArgument("--standalone", "-s")
      .help("Used to initialize a controller as a single-node dynamic quorum. When setting this flag, " +
        "the controller.quorum.voters config must not be set, and controller.quorum.bootstrap.servers is set instead.")
      .action(storeTrue())

    reconfigurableQuorumOptions.addArgument("--no-initial-controllers", "-N")
      .help("Used to initialize a server without specifying a dynamic quorum. When setting this flag, " +
        "the controller.quorum.voters config should not be set, and controller.quorum.bootstrap.servers is set instead.")
      .action(storeTrue())

    reconfigurableQuorumOptions.addArgument("--initial-controllers", "-I")
      .help("Used to initialize a server with the specified dynamic quorum. The argument " +
        "is a comma-separated list of id@hostname:port:directory. The same values must be used to " +
        "format all nodes. For example:\n0@example.com:8082:JEXY6aqzQY-32P5TStzaFg,1@example.com:8083:" +
        "MvDxzVmcRsaTz33bUuRU6A,2@example.com:8084:07R5amHmR32VDA6jHkGbTA\n. When setting this flag, " +
        "the controller.quorum.voters config must not be set, and controller.quorum.bootstrap.servers is set instead.")
      .action(store())
  }

  private def addVersionMappingParser(subparsers: Subparsers): Unit = {
    val versionMappingParser = subparsers.addParser("version-mapping")
      .help("Look up the corresponding features for a given metadata version. " +
        "Using the command with no --release-version  argument will return the mapping for " +
        "the latest stable metadata version"
      )

    versionMappingParser.addArgument("--release-version", "-r")
      .action(store())
      .help(s"The release version to use for the corresponding feature mapping. The minimum is " +
        s"${MetadataVersion.MINIMUM_VERSION}; the default is ${MetadataVersion.LATEST_PRODUCTION}")
  }

  private def addFeatureDependenciesParser(subparsers: Subparsers): Unit = {
    val featureDependenciesParser = subparsers.addParser("feature-dependencies")
      .help("Look up dependencies for a given feature version. " +
        "If the feature is not known or the version not yet defined, an error is thrown. " +
        "Multiple features can be specified."