This way I can isolate different versions of libraries for different projects and test conditions. Right now I'm just manually switching back and forth.
Yes, you can use the --pref option to set the sketchbook location in the sketchbook.path property, then save it using the --save-prefs option. For example, if you wanted to set your sketchbook to E:\foobar, the Windows command (use arduino_debug instead of arduino on Windows) would look like this: