Enabling console in packaged builds

You can enable console and most of its commands in packaged builds via the following:

UGameViewportClient* Viewport = GetWorld()->GetGameViewport();
if(Viewport->ViewportConsole == nullptr)
{
	Viewport->ViewportConsole = NewObject<UConsole>(Viewport, GEngine->ConsoleClass);
}
 

Similar to enabling CheatManager in packaged builds, you can f.ex. call this from the Player Controller BeginPlay.

Custom console commands

See How to create custom console commands