Hi @modiffer π That's a really interesting use-case. I'd love for Indigo to be scriptable one day, to make such scenarios much easier.
For now, I wonder if you could leverage the fact that the stack data storage format is simply json?
eg create a new stack, and configure your required services (apache/nginx/php etc), then configure one simple site in apache/nginx.
Next, in the Finder, open your stack x.indigostack
stack config file in a text editor (eg VS Code). This will be located, by default, in ~/Documents/Indigo
(but can reside anywhere you like).
In the config.json
you will find a sites
array containing a single entry, being for the site you configured earlier in the UI. If you programmatically add multiple sites directly in the JSON, when Indigo next launches, all those sites will appear in the UI as if you'd configured them right inside Indigo.
If you change this JSON array whilst Indigo is running, it will detect the change and the new config will take effect. However, it will throw up a dialog which will likely be difficult to close in an automated environment. However if Indigo is not running when the change is made, Indigo should silently effect your programmatic changes without any user interaction required.
Let me know if that makes sense!