One of the important things we (DIgitalist Sweden) needed was to fully automate the process of setting up Matomo - and one of the missing pieces for us were the possibility to setup Matomo with the console. So we added that, and also some other related console commands, in a plugin we are calling ExtraTools. We are still at alpha version, and we do not recommend it for production usage yet - but it would help if you would like to test it out.
ExtraTools are available from https://plugins.matomo.org/ and it is fully open source, Extra Tools - Matomo Plugins Marketplace. Repo is on GitHub: GitHub - digitalist-se/extratools
Please see the README for the usage of this plugin.
We hope that we later on can contribute to get the functionality into Matomo core.
Thanks for you work on this, it is a great tool, I have been using it via Ansible.
The plugin has grown a lot during the recent month, and now we have release 0.1.0-beta8 out. See the documentation for all the news, also we are now supporting by default the default env. variables used in the official Matomo docker container.
See documentation here: Extra Tools - Matomo Plugins Marketplace