Command line command to do cmd-r?

@Widdershin 's command line interface does, for example, sonic_pi stop. Is there a command to have it do a cmd-r?

Not really. cmd-R is issued from the gui, and needs to know such things as the current buffer, which it executes. An external interface doesn’t know which buffer this is.
You can work with an external editor to produce a file, and then use then sonic-pi-cli to execute a run_file command to send and run that. I have used it a lot. Several years ago I produced what I called a jukebox program to list all the sonic-pi programs in a folder and then use TouchOSC to select and play then in Sonic Pi. A selector in the program could let you change from stopping an existing program and starting the new one, or overlaying the two without stopping the first.
sonic-pi-cli uses undocumented features in Sonic Pi which can (and have) changed during its lifetime. It will need updating to work with the current SP 4beta (I have a patched version running at home).

Is it feasible to add a feature to enable Sonic Pi to respond to a command to either reload the buffer currently showing in the GUI, or, better, pass a buffer number as a parameter, then cmd-r the specified buffer?