Magento/n98-magerun/MAMP

n98-magerun has some useful tools.

Here is how you install if for MAMP so you can use it system wide:

Find and edit your .bash_profile

# Go to your home folder e.g. /Users/[YOURNAME] 
cd ~
cat .bash_profile
vim .bash_profile # or create bash_profile if it does not already exist

Add the following to your .bash_profile

# Use MAMP version of PHP
PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`
export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH

# Export MAMP MySQL executables as functions
# Makes them usable from within shell scripts (unlike an alias)
mysql() {
    /Applications/MAMP/Library/bin/mysql "$@"
}
mysqladmin() {
    /Applications/MAMP/Library/bin/mysqladmin "$@"
}
export -f mysql
export -f mysqladmin

Back in terminal, use source ~/.bash_profile after making your changes to make sure they take effect, and each time you run terminal.

Now install n98-magerun:

wget https://raw.githubusercontent.com/netz98/n98-magerun/master/n98-magerun.phar
chmod +x ./n98-magerun.phar
sudo cp ./n98-magerun.phar /usr/local/bin/

References: