The list of commands has been in app.commands.commands, not sure if it’s changed recently, but if not the following answer should give you the commands:
I’ve used this in some answers related to pulling out the hotkeys related to commands, but that shouldn’t be needed in your case (and I’m not sure whether the last revamp of the hotkeys section has changed any of the underlying structure rendering those script malfunctioning).