register a command using service provider