octocmd makes it easy to control your OctoPrint server from the command line. It understands how to process .scad files into .stl with OpenSCAD, and .stl files to make .gcode files with Cura. Check out the documentation.
$ octocmd print rabbit.scad [Tue May 20 22:05:34 2014 octocmd] generating '/home/linda/rabbit/rabbit.stl' with OpenSCAD [Tue May 20 22:05:46 2014 octocmd] generating '/home/linda/rabbit/rabbit.gcode' with Cura [Tue May 20 22:05:51 2014 octocmd] uploading, selecting, printing rabbit.gcode on OctoPrint