Hidden Command

It is possible to hide a command which is convenient in cases where it is not yet ready for prime time, is meant for debugging purposes or you have any other reason you dont want to advertise its presense.

Hidden command can be executed if you know it and its options. It is effectively removed from:

  • Help listing

  • Help page for command return "unknown command"

  • Command completion in interactive mode

  • Bash completion

Below is an example how to define command as hidden. It shows available builder methods to define hidden state.

CommandRegistration commandRegistration() {
	return CommandRegistration.builder()
		.command("mycommand")
		// define as hidden
		.hidden()
		// can be defined via a flag (false)
		.hidden(false)
		// can be defined via a flag (true)
		.hidden(true)
		.build();
}
Defining hidden commands is not supported with annotation based configuration