In the programmatic model, CommandRegistration is defined as a @Bean, and it is automatically registered:
CommandRegistration
@Bean
@Bean CommandRegistration commandRegistration() { return CommandRegistration.builder() .command("mycommand") .build(); }