You can control PulseAudio thoroughly through the command line using
pactl commands. For options see man pages or the wiki at PulseAudio:
pacmd list-sinks to list name or index number of possible sinks
pacmd set-default-sink "SINKNAME" to set the default output sink
pacmd set-default-source "SOURCENAME" to set the default input
pacmd set-sink-volume index volume
pacmd set-source-volume index volume for volume control (0 = Mute, 65536 = 100%)
and many many more CLI options.
Note: Changing the output sink through the command line interface can only take effect if stream target device reading is disabled. This can be done by editing the corresponing line in
load-module module-stream-restore restore_device=false
For a more elaborate tutorial on how to do this, and for instructions on how to change the sink during playback see this answer.