Sublime Text 2 comes with a cli utility called subl. If you refer to the Sublime text 2 official documentation, it says to create a bin folder in your home dir. Well.. I don't like doing that so lets create a symlink to make it work with our perfectly fine /usr/bin dir.
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
Thats it, thanks for reading : )
-- Make sure your bash (ie. ~/.bash_profile) has a path to your /usr/bin..