> For the latter, if you already know Python, you might want to consider (Open)PythonSCAD
If you know python then build123d(/cadquery) are also options:
https://github.com/gumyr/build123d