Skip to content

Instantly share code, notes, and snippets.

@muratcakmak
Last active December 26, 2025 08:17
Show Gist options
  • Select an option

  • Save muratcakmak/87d3fbf67d24085fddcf2286214f51e4 to your computer and use it in GitHub Desktop.

Select an option

Save muratcakmak/87d3fbf67d24085fddcf2286214f51e4 to your computer and use it in GitHub Desktop.
New Mac Setup Script Raw
#!/bin/sh
# ___ __ __ ____ _ ____ _
# / _ \| \/ |/ ___( )___ / ___| ___| |_ _ _ _ __
# | | | | |\/| | | |// __| \___ \ / _ \ __| | | | '_ \
# | |_| | | | | |___ \__ \ ___) | __/ |_| |_| | |_) |
# \___/|_| |_|\____| |___/ |____/ \___|\__|\__,_| .__/
# |_|
#
# React Native Developer Setup - 2025 Edition
echo "Creating an SSH key for you..."
ssh-keygen -t ed25519 -C "[email protected]"
echo "Please add this public key to Github \n"
echo "https://github.com/settings/keys \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Update homebrew recipes
echo "Updating homebrew..."
brew update
echo "Installing Git..."
brew install git
echo "Git config"
git config --global user.name "Oguzhan Cakmak"
git config --global user.email [email protected]
echo "Installing CLI tools..."
# Essential tools
brew install tree
brew install wget
brew install trash
brew install git-extras
brew install thefuck
brew install z
brew install gh
brew install jq
brew install ripgrep
brew install fzf
# React Native essentials
brew install node
brew install watchman
brew install cocoapods
brew install fastlane
brew install ruby
# Package managers
brew install yarn
brew install pnpm
# Java for Android builds
brew install --cask zulu@17
echo "Cleaning up brew"
brew cleanup
# Install Zsh & Oh My Zsh
echo "Installing Oh My ZSH..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
echo "Setting up Zsh plugins..."
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Apps
apps=(
# Development IDEs & Editors
antigravity
visual-studio-code
android-studio
# Terminals & Dev Tools
iterm2
warp
docker
tableplus
postman
proxyman
# Browsers
firefox
google-chrome
arc
# Utilities
raycast
monitorcontrol
rectangle
1password
cleanmymac
# Design
figma
# Communication
slack
discord
zoom
# Media
spotify
vlc
)
# Install apps to /Applications
echo "Installing apps with Cask..."
brew install --appdir="/Applications" --cask ${apps[@]}
brew cleanup
# Install global npm packages for React Native
echo "Installing global npm packages..."
npm install -g expo-cli
npm install -g eas-cli
npm install -g @react-native-community/cli
npm install -g typescript
npm install -g yarn
# Setup Android SDK paths
echo "Setting up Android environment variables..."
cat >> ~/.zshrc << 'EOF'
# Android SDK
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
# Java
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
# Ruby (for CocoaPods)
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
# Oh My Zsh plugins
plugins=(git zsh-syntax-highlighting zsh-autosuggestions z thefuck)
EOF
###############################################################################
# General macOS Settings
###############################################################################
# Disable Gate Keeper (install any app)
sudo spctl --master-disable
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Save to disk by default (not iCloud)
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Disable smart quotes and dashes (annoying for code)
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Full keyboard access for all controls
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Disable extension change warning
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Use column view in Finder
defaults write com.apple.finder FXPreferredViewStyle Clmv
# Avoid .DS_Store on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Dock: auto-hide with no delay
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
# Dock icon size
defaults write com.apple.dock tilesize -int 42
###############################################################################
# Screen
###############################################################################
# Screenshots location
defaults write com.apple.screencapture location -string "$HOME/Desktop"
# Screenshot format
defaults write com.apple.screencapture type -string "png"
###############################################################################
# Safari & WebKit
###############################################################################
# Enable Safari developer tools
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true
# Web Inspector in all views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
###############################################################################
# Keyboard (for React Native development)
###############################################################################
# Fast key repeat rate (great for Vim users)
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Disable auto-capitalization
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
# Disable automatic period substitution (double space to period)
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# Disable smart quotes and dashes (already set above, but ensuring it's here too)
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Map Caps Lock to Escape using hidutil (persists until reboot)
# For permanent mapping, we'll create a LaunchAgent
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}'
# Create LaunchAgent for persistent Caps Lock to Escape mapping
mkdir -p ~/Library/LaunchAgents
cat > ~/Library/LaunchAgents/com.local.CapsLockToEscape.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.local.CapsLockToEscape</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
<string>--set</string>
<string>{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
# Load the LaunchAgent
launchctl load ~/Library/LaunchAgents/com.local.CapsLockToEscape.plist 2>/dev/null || true
killall Finder
killall Dock
echo ""
echo "=============================================="
echo "Setup complete!"
echo "=============================================="
echo ""
echo "Next steps:"
echo "1. Open Android Studio and install Android SDK"
echo "2. Open Xcode and install iOS simulators"
echo "3. Sign into Antigravity with your Google account"
echo "4. Restart your terminal to apply zsh changes"
echo ""
echo "Happy coding!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment