Skip to content

Setup Dev environment on Mac

Install Stats

  • https://github.com/exelban/stats

Install brew.

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • export PATH=/opt/homebrew/bin:$PATH
  • Warning: Homebrew’s “sbin” was not found in your PATH but you have installed formulae that put executables in /opt/homebrew/sbin. Consider setting your PATH for example like so: echo 'export PATH="/opt/homebrew/sbin:$PATH"' >> ~/.zshrc

Install git

  • brew install git

To set case sensitivity in git

  • git config core.ignorecase false

Install ohmyzsh on iTerm2,

  • First download iTerm2

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

  • git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

  • open ~/.zshrc then, put this line in plugins=(git zsh-autosuggestions)

  • git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

  • ZSH_THEME="powerlevel10k/powerlevel10k"

  • git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

  • echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

  • source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Install composer

  • brew install composer

Install node

  • brew install node

Install nvm

  • curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

  • You should create NVM’s working directory if it doesn’t exist: mkdir ~/.nvm

  • Add the following to your shell profile e.g. ~/.profile or ~/.zshrc:

    export NVM_DIR="$HOME/.nvm" [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion

  • nvm install 18.15.0

Install PHP

  • brew install php
If you want to install a specific version-
If you need to have [email protected] first in your PATH, run:
For compilers to find [email protected] you may need to set:
To restart shivammathur/php/[email protected] after an upgrade:
For more info…

Install Valet

  • composer global require laravel/valet
  • valet install If zsh: command not found: valet, then export PATH=$PATH:~/.composer/vendor/bin
  • valet trust
  • cd Sites
  • valet park

Install phpmon

  • brew tap nicoverbruggen/homebrew-cask
  • brew install --cask phpmon

Install Mysql

  • brew install mysql, then follow the instruction.

Install phpmyadmin

  • brew install phpmyadmin
  • cd /opt/homebrew/share/phpmyadmin
  • valet link
  • valet restart

Install pnpm

  • npm install -g pnpm
  • If you installed Node.js using Homebrew, you’ll need to install corepack separately: brew install corepack

For productivity I use-

2 thoughts on “Setup Dev environment on Mac”

Leave a Reply to Ratul Hasan Cancel reply

Your email address will not be published. Required fields are marked *

thirteen − 3 =