I’m working on a project where it would be useful to control Sonic Pi from the command line on a headless Raspberry Pi. I found sonic-pi-tool (rust), which did what I need, but is written in Rust, which I am not very familiar with, and I don’t really want to have to install on my Raspberry Pi.
So, I decided to port it to Python. I haven’t tested it very thoroughly yet, but the basics seem to work. If anyone else would like to give it a try, you can find it here: sonic-pi-tool (python).
I hope someone finds it useful.