Check out this documentation: https://github.com/mendix/m2ee-tools/blob/develop/doc/README.md
I remember having a manual at some point that was different from what Charles pointed to. No idea where it came from and where it went though, it was probably something custom made for a specific customer.
But m2ee-tools is completely open source and not very extensive, so figuring out how to do this should not be too hard by looking at the code.