Powershell scripts, Bash scripts, Python scripts, etc. are also an option, but they would be more practical if we had an official clean, tested and well-documented API on how to access them through the command-line.
It has been talked about before, but it seems like it is kind of a mess at first glance to be honest:
I know some tricks to automate even software that don’t have a clean command-line API, but imo it’s not something that should be expected from the average normal user.