Here’s how to add composer vendor bin directory to your path so you can call composer from your terminal.
Go to ~/.bash_profile
Add the following to your ~/.bash_profile (Mac OS users) or into your ~/.bashrc (Linux users).
export PATH=~/.composer/vendor/bin:$PATH
You can use any text editor to add this line to the file or create a new “.bash_profile” file in your root ~/ directory if you do not already have one.