Skip to content

Instantly share code, notes, and snippets.

@guilsa
Forked from codeinthehole/osx_bootstrap.sh
Last active December 1, 2022 00:11
Show Gist options
  • Save guilsa/64e82fd2d348961fe4897b239fd34374 to your computer and use it in GitHub Desktop.
Save guilsa/64e82fd2d348961fe4897b239fd34374 to your computer and use it in GitHub Desktop.
Script to install stuff I want on a new OSX machine (last tested on macOS Catalina)
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# Before you begin:
# - Install nvm: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash && nvm install node`
# - Install rvm:
# - `curl -sSL https://get.rvm.io | bash -s stable`
# - `rvm install {{version}}`
#
#
# How to run:
# 1. Download the script (curl, etc)
# 2. Give executable rights: `chmod +x mac-setup.sh`
# 3. Run with `sh -x mac-setup.sh` (some app will need your password)
# 4. Once complete, review your output and take needed actions (ie. "keg-only" messages)
#
#
# Notes:
#
# - If installing full Xcode, it's better to install that first from the app
# store before running the bootstrap script. Otherwise, Homebrew can't access
# the Xcode libraries as the agreement hasn't been accepted yet.
# - This should be idempotent so it can be run multiple times.
#
# Other resources:
#
# - https://github.com/herrbischoff/awesome-macos-command-line
# - https://github.com/mathiasbynens/dotfiles/blob/master/.macos
# - https://gist.github.com/brandonb927/3195465
#
#
# Future ideas:
# - Migrate this to a README similar to https://github.com/ajmalsiddiqui/dotfiles
# - Add .exports similar to mathiasbynewns above
#
echo "Starting bootstrapping"
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
brew update
PACKAGES=(
ffmpeg
git
jq
libjpeg
wget
nmap
tmux
vim
postgresql
speedtest-cli
youtube-dl
tldr
tree
)
echo "Installing packages..."
brew install ${PACKAGES[@]}
echo "Cleaning up..."
brew cleanup
CASKS=(
firefox
brave-browser
google-chrome
iterm2
lunar # adjust 2nd monitor brightness on mac
simplenote # notes
spectacle # window manager
vlc
cyberduck # ftp client
postico # postgresql client
dbeaver-community # db client
docker
kitematic # docker GUI
figma # ui design
fork # git client
github # github desktop
# katalon-studio # recorder for automation testing
# mamp # local MAMP server
licecap # screen capture with GIFs
loopback # cable-free audio re-routing
ngrok
mongodb-compass
pdfsam-basic
private-internet-access
steam
spotify
slack # messaging
telegram # messaging
whatsapp # messaging
discord # messaging
transmission # torrent client
visual-studio-code
camunda-modeler # process modeler (similar to lucidchart.com/pages/bpmn)
)
echo "Installing cask apps..."
brew install --cask ${CASKS[@]}
echo "Installing Ruby gems"
RUBY_GEMS=(
bundler
cocoapods
)
sudo gem install ${RUBY_GEMS[@]}
echo "Bootstrapping complete"
@guilsa
Copy link
Author

guilsa commented Dec 1, 2022

For Vscode terminal toggling between maximized window, see https://stackoverflow.com/a/64339650/348282.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment