I'm spending a lot of time exporting and picking the dependencies for my modules and reusing them in other projects. It would be nice if there is some command line tool or api available so I can automate the exporting of module packages by script.
Cool, thank you!
The Mendix Platform / Model SDK has this option, you can export module packages with the exportMpk method. See https://docs.mendix.com/apidocs-mxsdk/mxsdk/sdk-intro for generic documentation on how to set up the SDK, and https://apidocs.mendix.com/modelsdk/latest/classes/modelsdkclientimpl.html#exportmodulempk for the documentation of this specific method.