About a year ago I have written how you can execute Java code that works with an MPS project from the command line. Recently this question has come up again, but the context was slightly different: how does one run MPS code as part of a continuous integration (CI) build?

I have linked to my previous article as a suggestion but Kolja Dummann had a better idea: if CI is already running tests, then one can simply create a node test (I have covered how they work recently) and invoke the code from a test method.

This has the advantage that all the necessary code to start MPS and open a project is already written for you. The disadvantage is that you don’t get a standalone tool that you can use outside of the CI context. If you need to create a standalone tool, the two options covered in the linked post are better suited.