public String getMiniHelp(String userInput) {
    if (StringUtils.isBlank(userInput)) {
      return null;
    }

    List<Method> methodList = commands.keySet()
        .stream()
        .filter(key -> key.startsWith(getCommandPart(userInput)))
        .map(commands::get).collect(Collectors.toList());

    if (methodList.size() != 1) {
      // can't validate arguments if buffer is not a single command
      return null;
    }

    Method m = methodList.get(0);
    CliCommand cliCommand = m.getDeclaredAnnotation(CliCommand.class);
    Annotation[][] annotations = m.getParameterAnnotations();

    if (annotations == null || annotations.length == 0) {
      // can't validate arguments if command doesn't have any
      return null;
    }

    // loop through the required options and check that they appear in the buffer
    StringBuilder builder = new StringBuilder();
    for (Annotation[] annotation : annotations) {
      CliOption cliOption = getAnnotation(annotation, CliOption.class);
      String option = getPrimaryKey(cliOption);
      boolean required = cliOption.mandatory();
      boolean requiredWithEquals = !isNonEmptyAnnotation(cliOption.specifiedDefaultValue());

      if (isNonEmptyAnnotation(cliOption.unspecifiedDefaultValue())) {
        required = false;
      }
      if (required) {
        String lookFor = "--" + option + (requiredWithEquals ? "=" : "");
        if (!userInput.contains(lookFor)) {
          builder.append("  --").append(option).append(requiredWithEquals ? "=" : "")
              .append("  is required").append(LINE_SEPARATOR);
        }
      }
    }
    if (builder.length() > 0) {
      String commandName = cliCommand.value()[0];
      builder.append("Use \"help ").append(commandName)
          .append("\" (without the quotes) for detailed usage information.")
          .append(LINE_SEPARATOR);
      return builder.toString();
    } else {
      return null;
    }
  }
get mini-help for commands entered without all required parameters

@return null if unable to identify anything missing
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/help/Helper.java