There are YANG annotations and CLISPEC options such as hide-group and display-when which can hide a command in CLI. This effectively removes the command (and can be done conditionally).
I have a slightly different use case. I want some of our CLI commands to be hidden from view in “?” output of the container in which they live. By hidden, I mean that the command should not be visible; however, if the user types them, I still want them to function. Is there any way to do this other than creating a custom completion callback handler? I am hoping that there may be some simple annotation that achieves this effect. Thank you.