Add an option that hides CLI commands

fixes #7702