This video shows MacOS users how to add a path the the PATH environment variable to they can open Visual Studio Code from the command line. Assuming you have installed Visual Studio Code in your home directory's Applications folder, you would add this line to your ~/.bash_profile:
export PATH="~/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH"