TextGen from CLI

Hello everyone,

how do I get the text generation to run from the CLI?
I found some old post with broken links to the jetbrains confluence.

Are there any current descriptions somewhere that I’ve missed?

Thank you in advance

Hello Jens,

the process to run the generator using Ant is described at Generator | MPS Documentation
I hope it will give you useful directions. Feel free to ask here for additional details, if needed.

Cheers,
Vaclav

Just to be sure.
A command like this would work with the CLI without starting MPS?

ant -buildfile myLanguage_TextGen.build.xml (just an example)

Sorry for the double question, but the learning curve is very steep and I don’t want to get caught up in something that doesn’t work at all in the end.

I read your question in a way that you’re not specifically interested in TextGen only, but general transformation/generation process and that you oppose CLI vs MPS IDE. Then, yes, you can run MPS M2M and M2T transformation without starting MPS IDE. It’s not a generic Ant script, you’ll need to produce one with MPS (craft one using build language). In MPS-generated Ant script, there’s a task to start parts of MPS necessary for M2M and M2T transformations.

If you focus specifically on applying TextGen only, there’s no out-of-the-box solution for that, but it’s not hard to craft one using runMPS task, where you get MPS instance ready for your code, and would need to initiate TextGen using some MPS APIs