/mac-setup

Reference document on how I set up any of my mac devices using terminal

Primary LanguageShellMIT LicenseMIT

Power of macOS Terminal

Here is how I set up any mac device using terminal

1- Installing HomeBrew to have the ability to automate installing more than n^ apps/packages automatically

/bin/bash -c "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))"
  • Installing Needed Apps
// I moved sf-symbols and virtualbox to the front since they require passwords 
brew install --cask cursor \
virtualbox \
sf-symbols \
google-chrome \
alfred \
visual-studio-code \
notion \
zoom \
mongodb-realm-studio \
obsidian \
brave-browser \
microsoft-teams \
airbuddy \
android-studio \
dbeaver-community \
docker \
figma \
iina \
postman \
sourcetree \
telegram \
slack \
transmission \
virtualbox-extension-pack \
imazing \
surge \
the-unarchiver \
xcodes \
devtoys \
raycast \
little-snitch \
tableplus \
sublime-text \
sublime-merge \
angry-ip-scanner \
shottr \
wave \
virtualbuddy \
corretto \
logitech-options \
google-cloud-sdk \
insomnia
  • Installing needed packages
brew install \
exa \
openshift-cli \
carthage \
fastlane \
python \
go \
poetry \
npm \
openjdk 
  • Install Terraform
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
  • Installing optional quick look packages here

2- Installing Cocoapods package manager for iOS/macOS apps

sudo gem install cocoapods

3- Installing oh-my-zsh for better command-line experience

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

4- Installing npm related tools globally

npm install -g firebase-tools
  • Changing the theme to use jonathan by replacing theme name using sed
sed -i.bak 's/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"jonathan\"/g' ~/.zshrc
brew install zsh-autosuggestions

5- Creating .profile file

  • Create file for .profile and added your alias and custom functions
vim ~/.profile
  • Appending the below to the end of this file → ~/.zshrc
echo "source ~/.profile" >> ~/.zshrc
  • First let’s install the needed fonts by running the following
git clone --depth 1 https://github.com/adobe-fonts/source-code-pro.git ./Desktop/temp-fonts && \
cd Desktop/temp-fonts/TTF && \
mv *.ttf ~/Library/Fonts && \
cd ~ && \
rm -rf Desktop/temp-fonts
  • Now let's add the theme and that’s it!
git clone https://github.com/cs4alhaider/XcodeTheme.git ./Desktop/temp-theme && cd Desktop/temp-theme && mkdir ~/Library/Developer/Xcode/UserData/FontAndColorThemes && mv *.xccolortheme ~/Library/Developer/Xcode/UserData/FontAndColorThemes && cd ~ && rm -rf Desktop/temp-theme

7- Adding Xcode extensions

8- Installing firacode fonts:

Clone this repo and then:

chmod +x install_firacode_fonts.sh
./install_firacode_fonts.sh