Last active
June 26, 2026 06:53
-
-
Save vardumper/f2781d52291c813fff8b26025fd6e3ed to your computer and use it in GitHub Desktop.
macOS Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Configs | |
| ME="Full Name" | |
| EML="email@domain.tld" | |
| HOST="compName" | |
| # System identity | |
| sudo scutil --set HostName "$HOST" | |
| sudo scutil --set LocalHostName "$HOST" | |
| sudo scutil --set ComputerName "$HOST" | |
| dscacheutil -flushcache | |
| # Git configurations | |
| git config --global alias.co checkout | |
| git config --global alias.br branch | |
| git config --global alias.ci commit | |
| git config --global alias.st status | |
| git config --global user.name "$ME" | |
| git config --global user.email "$EML" | |
| git config --global core.editor "nano" | |
| git config --global --add --bool push.autoSetupRemote true | |
| # SSH Key generation | |
| ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -C "$ME" | |
| # Xcode Command Line Tools | |
| xcode-select --install | |
| # Homebrew Installation | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| # Evaluate brew for the rest of this shell script (Handles Intel vs Apple Silicon paths) | |
| if [ -f /opt/homebrew/bin/brew ]; then | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| elif [ -f /usr/local/bin/brew ]; then | |
| eval "$(/usr/local/bin/brew shellenv)" | |
| fi | |
| # Brew Formulae & Casks | |
| brew install htop wget php ansible ansible-lint libsass node-sass composer fish tar pigz fnm | |
| brew tap homebrew/cask-fonts | |
| brew install --cask font-meslo-lg-nerd-font | |
| brew install --cask --no-quarantine syntax-highlight | |
| brew install --cask beekeeper-studio | |
| brew install ddev/ddev/ddev | |
| brew install --cask discord | |
| brew install --cask orbstack | |
| brew install --cask postman | |
| brew install --cask redisinsight | |
| brew install symfony-cli/tap/symfony-cli | |
| brew install --cask textmate | |
| brew install --cask visual-studio-code | |
| brew install --cask visual-studio-code@insiders | |
| brew install --cask vlc | |
| # trust | |
| brew trust dart-lang/dart | |
| brew trust ddev/ddev | |
| brew trust sass/sass | |
| brew trust symfony-cli/tap | |
| # Finish DDEV install | |
| mkcert -install | |
| # Change default shell to Homebrew Fish safely | |
| BREW_FISH="$(brew --prefix)/bin/fish" | |
| if ! grep -q "$BREW_FISH" /etc/shells; then | |
| echo "$BREW_FISH" | sudo tee -a /etc/shells | |
| fi | |
| chsh -s "$BREW_FISH" | |
| # Ensure Fish configuration directory structure exists | |
| mkdir -p ~/.config/fish/conf.d | |
| # Setup Composer global bin path in Fish | |
| echo 'fish_add_path $HOME/.composer/vendor/bin' >> ~/.config/fish/config.fish | |
| # Add aliases to Fish config (Note: Removed 'omz update' since you're using Fish now) | |
| echo "alias updatedb='sudo /usr/libexec/locate.updatedb'" >> ~/.config/fish/config.fish | |
| echo "alias brewup='brew update && brew upgrade --greedy --force && brew cleanup --prune=all && composer global update && composer global bump'" >> ~/.config/fish/config.fish | |
| # Bootstrap Fisher, Tide, and NVM via Fish | |
| "$BREW_FISH" -c ' | |
| # Install Fisher (Fish Package Manager) | |
| curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher | |
| # Install Tide Prompt via Fisher | |
| fisher install ilancosman/tide@v6 | |
| # Fix the Tide layout bugs and hide the "D" icon universally (Runs ONCE during setup) | |
| set -U tide_vi_mode_icon_default "" | |
| set -U tide_character_vi_icon_default "❯" | |
| set -U tide_vi_mode_display_prompt False | |
| # Initialize fnm for this temporary bootstrapping shell instance | |
| fnm env --use-on-cd | source | |
| # Install the latest LTS version | |
| fnm install --lts | |
| # Extract the exact version number from the last line of the remote list | |
| # e.g., converts "v22.11.0" or similar into a clean string for fnm default | |
| set -l lts_version (fnm list-remote --lts | tail -n 1) | |
| fnm default $lts_version | |
| # Safe Corepack activation strategy for modern Node versions | |
| npm install -g corepack | |
| corepack enable | |
| yarn set version latest | |
| ' | |
| # Updatedb and Locate initialization | |
| sudo /usr/libexec/locate.updatedb | |
| # Configure GitHub CLI (Uncomment if needed) | |
| # gh auth login | |
| echo "Setup complete! Please restart your terminal to enter your new Fish environment." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment