Can I launch a ROM via CL/Script in Android?

First off thanks for this amazing software!

I’d like to be able to launch ROMs from a script so I can make a custom front end on Android. Is this possible and if so what kind of syntax and function calls do I need?

Thanks