Warning
Deprecated
This repo will soon be archived. It will stay accessible but I will no longer be making updates.
I am moving to an "All-In-One" setup repo for macOS, Linux, Windows, SteamDeck and Ungoogled Android.
Opinionated notes and scripts for setting up a fresh macOS computer for web development (Follow at your own risk / benefit)
NB: Requires macOS 11+ (ideally macOS 12+)
If its your first time here, I'd recommend skipping this automated install and following the steps manually. This will give you a chance to read the instructions and make sure you're happy with everything.
If you just want to run the whole thing in one go, you can use the following command:
๐ง Are you sure you want to automate this?
Yes, please reveal
bash <(curl -s https://raw.githubusercontent.com/miclgael/setup/main/scripts/main.sh)
Or you can just clone the repo, CD in and run sh scripts/main.sh
Please note, even if you do run the automated install, you'll still need to manually clean-up some steps at the end. So its a good idea to keep this README around.
๐ป Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Installs Xcode command line tools
- Installs Git!
- Gives access to the
brew
command.
I like to immediately install this, otherwise I forget and then things go haywire later when I pull down a repo that needs lfs.
brew install git-lfs
๐ค Install zsh and oh-my-zsh
Zsh should be installed first! See installing zsh or use brew:
brew install zsh
(follow the instructions)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
(follow the instructions, again)
Install plugins
brew install spaceship zsh-autosuggestions zsh-syntax-highlighting
Reference ./dotfiles/modules/sources.sh
This can be an awful process but I found this combination of solutions to work well for me.
Full steps here
brew install gnupg pinentry-mac
Quit and reopen your terminal here. Heck, restart your machine.
Create and append pinentry, "allowing the gpg key's passphrase to be stored in the login keychain, enabling automatic key signing". - Wes
mkdir -m 700 -p ~/.gnupg && \
touch ~/.gnupg/gpg-agent.conf && \
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf &&\
killall gpg-agent
Create a new key that will work locally and also with Github.
gpg --default-new-key-algo rsa4096 --gen-key
Test GPG is working
echo "test" | gpg --clearsign
- List the keys
- Copy line #2 to your clipboard
gpg --list-secret-keys --keyid-format=long | grep sec -A 1
Print ASCII version of the key, for Github.
gpg --export --armor YOUR_GPG_KEY_HERE | pbcopy
Then, paste the output into GitHubโs GPG settings page
Finally, tell git about your key
git config --global user.signingkey YOUR_GPG_KEY_HERE
git config --global commit.gpgsign true
git config --global gpg.program gpg
ln -s /usr/local/bin/gpg /usr/local/bin/gpg2
In Sourcetree, go to advanced settings and point the gpg file to /usr/local/bin
brew unlink gpg && brew link gpg
# Kill gpg-agent
killall gpg-agent
# Run gpg-agent in daemon mode
gpg-agent --daemon
brew install --cask iterm2 visual-studio-code mamp codekit tableplus tower obsidian hoppscotch docker fastfetch && \
brew install --cask google-chrome firefox homebrew/cask/firefox@developer-edition && \
brew install composer
- Fix iTerm2 Arrow Keys
- Change default ๏ฃฟ+click browser (see also: https://stackoverflow.com/a/61221700)
Micro editor (nicer than Nano, easier than Vim)
brew install micro
There are a few ways to handle this, depending on your flavour of VS Code.
- Easy: If you don't care about telemetry, just use the built-in sync functions in VS Code. Note: a Microsoft or Github* account is required
- Medium: If you're using VS Codium, you might like to try the Settings Sync extension. Connect to a Github Gist in order to save your settings
- Hard: Manually install using the command line,
code --install-extension <extension-name>
. You could still save your settings to a Github Gist)
* ๐
brew install --cask figma nucleo imageoptim
- โจ Bonus: Discover icon sets for Nucleo โ
- Download Sketch v75
- Get Sketch plug-ins, e.g. SVGO Compressor
Install Fira Code font
brew tap homebrew/cask-fonts && \
brew install font-fira-code
Install Google Web Fonts
curl https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash
brew install --cask 1password nordvpn carbon-copy-cloner dropbox
brew install --cask microsoft-teams microsoft-outlook onedrive discord signal zoom megasync thunderbird
Thunderbird notes
Must-have extensions:
- RemindMe - The missing snooze functionality for inbox zero freaks like me
- TbSync - Calendar and contact syncing
- Provider for Exchange ActiveSync - Add-on for TbSync
Preferences:
- Enabled quick filter:
View > Toolbars > Quick Filter Bar โ
- Set layout vertical:
View > Layout > Vertical View โ
- Use unified folders:
View > Folders > Folder Mode > Unified Folders โ
- Density level:
View > Density > Default โ
- Sort by descending:
View > Sort By > Date โ > Descending โ
brew install --cask ableton-live-suite loopback && \
brew install --cask handbrake obs && \
brew install progrium/taps/topframe && \
brew install blackhole-16ch && \
brew install switchaudio-osx && \
brew install --cask vlc && \
brew install --cask ilok-license-manager
๐ Install Node Version Manager
Installs NVM (switch between multiple versions of Node.JS on the same system)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Installs Node.JS and relative NPM version.
nvm install node # "node" is an alias for the latest version
๐ค Auto-load from `.nvmrc` when changing directory
Reference ./dotfiles/modules/scripts.sh
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
Note: If using NVM, you may need to run this again once per node version.
npm install -g onchange eslint@8.0.0 stylelint @antfu/ni
Reference ./dotfiles/modules/aliases.sh
brew install --cask alfred bartender rocket bettertouchtool && \
brew install --cask homebrew/cask-drivers/elgato-control-center && \
brew install speedtest-cli && \
brew install --cask syncthing cleanshot rustdesk
brew install --cask steam plex && \
brew install --cask homebrew/cask-drivers/sony-ps-remote-play
@TODO - test this
git clone git@github.com:miclgael/setup.git ~/Code/projects/setup && \
mv ~/Code/projects/setup/dotfiles/.zshrc.example ~/.zshrc
Reference: ./dotfiles/main.sh
mas-cli lets us install App Store apps through a CLI. You need to gather up the ID of each app by visiting their respective pages in a web-browser.
brew install mas
This one liner contains the ID's of each of the apps in the table below.
Remember to sign into the App store at least once before running!
mas install 937984704 1450640351 1481029536 360593530 1176895641 425424353 904280696 1494210770 1529448980 1287239339 571213070
These are some apps I sometimes use, but can't currently aquire via Homebrew.
AppStore Link | price | Note |
---|---|---|
Amphetamine | free | Prevent OS from sleeping |
Lightweight PDF | free | Minify PDFs for sharing |
Noizio Lite | free/paid | white noise generator |
Notability | paid | Sync with iPad notes app |
Spark Email | free | a very amazing email experience* |
The Unarchiver | free | Slightly better archiving GUI |
Things 3 | paid | The sexiest to-do app |
Tomato 2 | free/paid | Tidy Pomodoro alarm |
Reeder 5 | paid | I sync Pocket and FreshRSS to this |
Xcode | free | Purely for simulating iOS devices |
ColorSlurp | free | Keep track of branding and colours |
Davinci Resolve | free | Now available in the MAS! |
* But do read the privacy policy
- Get Custom iTerm Applescripts for Alfred (skip if iTerm prefs are in Dropbox).
- Grab OBS Camera for web-camming (skip if using
./scripts/modules/cleanup.sh
) - Sign in to Vital.audio to download VST synth
- Grab printer drivers from Canon and TP-Link
- Grab some custom app icons
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
killall Dock
๐ก Tip I usually add 7 gaps to visually separate my apps into the following 8 groups
- Email, To-do, Calendar, Notes
- Web browsers
- Password / Auth
- Development tools
- Music apps
- Design tools
- Misc.
I set up slightly different docks between my work and personal machines.
Reference: ./scripts/modules/dock.sh
+ scripts/modules/dock-office.sh
- Some scripts include portions based on work by Mathias Bynens