How can I create administration panel roles programmatically

Yeah, it’s a failsafe. You should only use that feature on non-development environments.