If you want to launch SublimeText from the command line on macOS, here you go...
$ ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
$ ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
Now you can...
$ cd ~/code/project
$ sublime .
$ subl .