Getting a new device; it is a day that developers look forward to and dread in equal measure. Why you ask?
Don't misunderstand, we love getting a new device. It gives us a clean slate to start fresh and, usually, a new device means a hardware upgrade to some degree.
But, this new device brings with it a problem. For most of us, we will spend the better part of a day setting it up. From downloading countless applications, to updating countless config files; it is a chore to set up a new device to make it conducive for development.
I was convinced there had to be a better way. Luckily, I am not the first developer who wished they could simplify their on-boarding process.
This repository walks you through the steps (including terminal commands and config files) I use when on-boarding a new macOS device for web application development.
-
Clone this repo
git clone https://github.com/chrishuman0923/macOS_Setup.git cd macOS_Setup/
-
Sign in to iCloud account
-
Sign in to App Store
-
Download Xcode command line tools
-
Needed by many npm packages
xcode-select --install
-
-
Set user execution permissions to run config scripts in this repo
chmod -R u+x config
-
Run script to handle general configuration details
./config/general.sh
-
Run script to configure Zsh
./config/zsh/zsh.sh
-
Run script to configure git globals
./config/git/git.sh
I configure Github with an ssh key to avoid entering my Github credentials each time I interact with a remote and to avoid adding my Github credentials to iCloud Keychain.
-
Run script to generate ssh key for Github and add it to ssh-agent
./config/ssh/ssh.sh
-
Copy public key to clipboard and add it to Github here
cat ~/.ssh/id_rsa_github.pub | pbcopy
-
Restart device
-
Confirm ssh authentication is set up correctly and key is being loaded after restart
ssh -T git@github.com
I use Homebrew to install and manage the majority of my applications.
-
Run script to install Homebrew
./config/homebrew/homebrew.sh
-
Alfred is my quick launcher of choice. Re-map
CMD + space
from Spotlight to Alfred.
There are a few apps that I have to get directly from the app store.
-
Run script to install app store apps
-
NOTE: Please review this script before executing because some of the apps are not free.
./config/mac/apps.sh
-
I use nvm to easily manage and switch between versions of Node.js
-
Install nvm and latest stable version of Node.js
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash nvm install stable
-
Run script to configure npm
./config/npm/npm.sh
-
Run script to install VS Code extensions
./config/vscode/vscode.sh
- If the above command fails
- Open VS Code
- Use
CMD + Shift + P
to open the command palette - Type
install
- Choose
Shell Command: Install 'code' command in PATH
- Restart terminal and re-run the command
- If the above command fails
I am using the following browser extenions for Google Chrome.
- 1Password X - Password Manager
- HTTPS Everywhere
- JSON Formatter
- OneTab
- Privacy Badger
- React Developer Tools
- Redux DevTools
- Tabliss
- uBlock Origin
Unfortunatley, this setup does not include "auto-magically" signing in to all of the accounts for the applications installed. Maybe in a future update. 🤞🏻 😁
I have to give credit to w3cj and nikhilgorantla for the inspiration and several of the code snippets/methods used within this repo.