I use a Mac for my primary computer and sometimes I need to setup a new VM similar to my computer for testing.
Here is the basic setup that I use HomeBrew for. I’ll add more later as I remember more or use it more.
# Install HomeBrew
if ! type "brew" > /dev/null; then
#/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)";
fiNOTE: If you receive an error on installing HomeBrew like “Error: Failed to link all completions, docs and manpages: Permission denied” try this
# This command should work
sudo chown -R $USER:admin /usr/local/*
# If the above doesn't work use this (of course change the username 'dkittell' to your username
sudo chown -R dkittell:admin /usr/local/*
# Install HomeBrew
if ! type "brew" >/dev/null; then
#/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
# If you work with Virtual Machines these two lines will be helpful
brew cask install vagrant
brew cask install virtualbox
# Install Python Pip
sudo easy_install pip
# Install BashBeautify
sudo pip install --upgrade bashbeautify
# Install Azure CLI
brew install azure-cli
# Install Amazon (AWS) CLI
brew install awscli
# Install Telnet
brew install telnet
# Install Visual Studio Code
brew cask install visual-studio-code
open /Applications/Visual\ Studio\ Code.app
# Once in Visual Studio Code - Command+Shift+P
# shell command
# Back to Terminal
# Install Azure CLI
code --install-extension ms-vscode.azurecli
# Install HTML/CSS/JS Beautifier
code --install-extension HookyQR.beautify
# Install PHP Beautifier
cd ~/ && curl -sS https://getcomposer.org/installer | php && cp composer.phar /usr/local/bin/composer && sudo chmod +x /usr/local/bin/composer && composer global require friendsofphp/php-cs-fixer
code --install-extension junstyle.php-cs-fixer
echo "{" >>~/Library/Application\ Support/Code/User/settings.json
echo "\"php-cs-fixer.executablePath\": \"~/.composer/vendor/bin/php-cs-fixer\"" >>~/Library/Application\ Support/Code/User/settings.json
echo "}" >>~/Library/Application\ Support/Code/User/settings.json
# Install FTP-Sync
code --install-extension lukasz-wronski.ftp-sync
# Install Java JDK
brew cask install java
# Install Eclipse C++
brew cask install eclipse-cpp
# Install Skype
# brew cask install skype
# Install DropBox
brew cask install dropbox
# Install Google Drive
brew cask install google-drive-file-stream
# Install Google Chrome
brew cask install google-chrome
# Install YouTube Downloader CLI
brew install youtube-dl
#region ffmpeg
# 1. Tap the repository
brew tap homebrew-ffmpeg/ffmpeg
# 2. Define the desired options list
desired_options=(
"--with-fdk-aac"
"--with-freetype"
"--with-libass"
"--with-libmp3lame"
"--with-libogg"
"--with-opencore-amr"
"--with-openjpeg"
"--with-openssl"
"--with-opus"
"--with-speex"
"--with-theora"
"--with-libvorbis"
"--with-libvpx"
"--with-x264"
"--with-xvid"
)
# 3. Get all supported options from Homebrew into an array
supported_options=("${(@f)$(brew options homebrew-ffmpeg/ffmpeg/ffmpeg)}")
# 4. Filter only matching options
valid_options=()
for opt in "${desired_options[@]}"; do
if (( ${supported_options[(Ie)$opt]} )); then
valid_options+=("$opt")
else
echo "Skipping unsupported option: $opt"
fi
done
# 5. Run install with valid options
brew install homebrew-ffmpeg/ffmpeg/ffmpeg "${valid_options[@]}"
#endregion ffmpeg
# Install Redis - CLI is all I care about
brew install redis
# If you want full Redis server follow https://gist.github.com/nrollr/eb24336b8fb8e7ba5630
# Install JQ (JSON Parser)
brew install jq
# Install FileZilla (FTP Client)
brew cask install filezilla
# Install PowerShell
brew install --cask powershell
# Install cdparanoia (CD Track Ripper), lame (MP3 conversion), and wget
brew install libcdio-paranoia lame wgetsh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Change Theme to Avit Theme (OPTIONAL)
cat .zshrc | grep ZSH_THEME
sed -i '.original' 's/ZSH_THEME="robbyrussell"/ZSH_THEME="avit"/gp' ~/.zshrc
cat .zshrc | grep ZSH_THEMEIncidentally if you want/need to uninstall HomeBrew or Oh My Zsh
# Remove everything installed with HomeBrew
brew list -1 | xargs brew rm
# Remove HomeBrew (In some cases Sudo is not needed)
#sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
sudo rm -rf /usr/local/Homebrew/.github/
sudo rm -rf /usr/local/Homebrew/bin/
sudo rm -rf /usr/local/Homebrew/completions/
sudo rm -rf /usr/local/Homebrew/docs/
sudo rm -rf /usr/local/Homebrew/Library/
sudo rm -rf /usr/local/Homebrew/manpages/
sudo rm -rf /usr/local/etc/openssl
sudo rm -rf /usr/local/etc/wgetrc
sudo rm -rf /usr/local/microsoft/powershell
sudo rm -rf /usr/local/Caskroom/
sudo rm -rf /usr/local/bin/powershell
sudo rm -rf /usr/local/Homebrew/
sudo rm -rf /usr/local/remotedesktop/
sudo rm -rf /usr/local/var/homebrew/
# Remove Oh My Zsh
cd ~/
sh .oh-my-zsh/tools/uninstall.sh
rm -rf .oh-my-zsh
rm -rf .zsh-update
rm -rf .zsh_history
rm -rf .zshrc
rm -rf .zshrc.*
rm -rf .zcompdump*
chsh -s /bin/bashOne thing to note is after you uninstall Oh My Zsh you may need to close and reopen Terminal to see the difference.
Last Updated on October 2, 2026
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.