Programmatic

Programmatic way with CommandRegistration is to use withOption to define an option.

CommandRegistration registration = CommandRegistration.builder()
	.withOption()
		.longNames("arg1")
		.and()
	.build();

CommandRegistration can be defined as a bean or manually registered with a CommandCatalog.

Check below sections for other option types, i.e. short format.