**For Sublime Text 3:**
`open /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl`
You now need to create a symlink called sublime which links the subl CLI to a folder where your system usually looks to execute these binaries. To do this, type in:
`ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime`
**Open your bash profile**
`open ~/.bash_profile`
and add
`export PATH=/usr/local/bin:$PATH`