Skip to content

Instantly share code, notes, and snippets.

@elgehelge
Forked from t-io/osx_install.sh
Last active October 3, 2025 11:06
Show Gist options
  • Save elgehelge/2e35b16baff5aa3abb5a769f75badf59 to your computer and use it in GitHub Desktop.
Save elgehelge/2e35b16baff5aa3abb5a769f75badf59 to your computer and use it in GitHub Desktop.
Install most of my apps with homebrew & cask
#!/bin/sh
# Mac settings
defaults write com.apple.finder AppleShowAllFiles YES
defaults write /Library/Preferences/FeatureFlags/Domain/UIKit.plist emoji_enhancements -dict-add Enabled -bool NO
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
# Homebrew (cask included)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Terminal (iTerm2)
brew install --cask --appdir="/Applications" iterm2
echo "Add these Shortcut Keys to iTerm2 (btw. use Profile > Keys):"
echo "https://stackoverflow.com/questions/6205157/iterm-2-how-to-set-keyboard-shortcuts-to-jump-to-beginning-end-of-line/22312856#22312856"
echo "or"
echo "Presets > Natural Text Editing"
echo "end making seletction work:"
echo "https://stackoverflow.com/questions/30055402/how-to-select-text-in-iterm-with-shiftarrow/46905994#46905994"
read -p "Press any key to continue... " -n1 -s
echo "\n"
## Shell (zsh)
### Plugins
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo '\n\n\n' >> ~/.zshrc
echo '# --------' >> ~/.zshrc
echo '# MY STUFF' >> ~/.zshrc
echo '# --------' >> ~/.zshrc
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM}/plugins/zsh-history-substring-search
echo 'source ${ZSH_CUSTOM}/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc
echo 'source ${ZSH_CUSTOM}/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh # after syntax highligting' >> ~/.zshrc
echo 'source ${ZSH_CUSTOM}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # says it want to be the last' >> ~/.zshrc
echo 'bindkey "$terminfo[kcuu1]" history-substring-search-up' >> ~/.zshrc
echo 'bindkey "$terminfo[kcud1]" history-substring-search-down' >> ~/.zshrc
### Prompt
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
echo 'ZSH_THEME="spaceship"' >> ~/.zshrc
### Direnv
brew install direnv
echo '# direnv' >> ~/.zshrc
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
## SSH
ssh-keygen -t ed25519 -C "[email protected]"
touch ~/.ssh/config
echo "Host github.com" >> ~/.ssh/config
echo " AddKeysToAgent yes" >> ~/.ssh/config
echo " UseKeychain yes" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
echo "" >> ~/.ssh/config
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
# Copies the contents of the id_ed25519.pub file to your clipboard - ADD THIS TO GITHUB
pbcopy < ~/.ssh/id_ed25519.pub
## Git
brew install git
brew install git-lfs
echo ".DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global core.editor "subl -n -w"
## Python
brew install python
export PATH=$(brew --prefix python)/libexec/bin:$PATH
## Other CLI
brew install gh
brew install orbstack
brew install awscli
brew install k9s
brew install kubectx
brew install tree
# Cleanup
brew cleanup
# Non-terminal setup
echo "Install all the ordinary apps"
echo "Consider:"
echo "* Magnet"
echo "* CopyClip"
echo "* Amphetamine"
echo "* Brave"
echo "* Slack"
echo "* Messenger"
# echo "* Google Drive"
echo "* Spotify"
echo "* VLC"
read -p "Press any key to continue... " -n1 -s
echo "\n"
echo "Done!"
echo "Now restart as well."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment