Open or create ~/.bash_profile
and add the following lines:
# Sublime
alias sublime='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
This will allow you to type sublime
in the Terminal to open Sublime Text 3.
To open files with Sublime type the following command:
sublime ~/.bash_profile