[cli] Extend command function signature to take a command info.