How can I create custom console commands?

How can I create my own custom console commands? It would be great to do this in blueprints.

In the UE source code, I see default console commands being registered in the ConsoleManager. Do I need to somehow do this same thing in C++? If so, how can I get an instance of the ConsoleManager and register it, and ideally how could I hook that up to a Blueprint?

Thanks.

I think Console commands are simply decorated with UFUNCTION(), which will expose them to the console.
I think they also need to be declared in some specific classes like your PlayerController, Character or GameMode, as not all classes’ UFUNCTIONS will be exposed to the console.

in C++, use UFUNCTION(Exec)