wp cli has-command <command_name>

Detects if a command exists

Arguments

NameDescription
command_nameThe command