Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
Using Sublime Text 2
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
Using Sublime Text 3