Closed swyxio closed 1 year ago
I've just upgraded my old MacBook Air to a MacBook Pro with M2 chip. Here is how I setup it: https://shinyzhu.com/posts/2023/shinys-new-macbook-setup/
Love reading these types of posts, I always find something new!
Here's how I do my new MacBook setup. https://bradgarropy.com/blog/new-macbook-setup
title: My 2023 New Mac Setup description: I set up a new Mac for work today. Here's everything I use on a Mac for fullstack web development. tags: mac, tech published: true slug: new-mac-setup category: note canonical_url: https://www.swyx.io/new-mac-setup/
I set up my new Macbook Air (13 inch, 2023 M2 16 GB RAM 1TB HD) today. Here's everything I use on a Mac.
Scroll all the way to the bottom for lists and other Mac setup tools from friends!
Immediate first steps
Things that take a while to install
Get these going first so they can run in the background
Install ZSH -
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
If M1 mac:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
to install Rosetta2Install Homebrew -
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
and theni have a bunch more stuff in
brew list
but i'm not sure what i use actively. You can mass install these - dump them in apackages.txt
and thenbrew install $(cat packages.txt)
arch -x86_64 brew install YOUR_PACKAGE
. as of 2023 i had no issues with this with m2/macos venturash <(curl -L https://nixos.org/nix/install) --daemon
Either of these will prompt you to install Apple Command Line Tools - takes 15-25 minutes to download the damn thing so do this first. Don't run them in parallel.
OS/Browser Settings
My full list of extensions I use are here:
Setup Terminal
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
source ~/.zshrc
to load the zshrcgit config --global init.defaultBranch main
git config --global user.name "swyxio"
agit config --global user.email shawnthe1@gmail.com
diff-so-fancy
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
- makes for much nicer git diffdif() { git diff --color --no-index "$1" "$2" | diff-so-fancy; }
or with VSCodecode --diff file1.js file2.js
./.oh-my-zsh/themes/agnoster
theme from dotfilesSee previous year for my Hyper terminal recommendations.
Set up apps/environments
You should have already installed a bunch of stuff with Homebrew as per above. Below I will list other stuff that you may wish to use:
brew install github/gh/gh
gh auth login
pyenv
installed from brew. now runpyenv install 3
to get the latest python 3. thengit clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
andpyenv global 3
to activate the thing you just installed.uv
from Astral. it's a replacement for pip, virtualenv, pyenv, poetry, etc. very new but not a ton of personal experience and intend to try next time.pip install uv
, then instead of futurepip install
useuv pip install
, oruv venv
instead ofvirtualenv
orpython -m venv
. much faster and interchangeable with other tools... but still may have minor dependency resolution issues particularly for old projects.Failed to activate virtualenv. Perhaps pyenv-virtualenv has not been loaded into your shell properly.
errors, which i fixed with this.pip3 install torch torchvision
fnm install 18
to install nodenpm login
arch -x86_64 zsh
lets you avoid weird dotenv errors but it didnt work for me (just running npm i on swyxkit)fnm install 16
npm login
npm config set loglevel="warn"
sudo npm install netlify-cli -g
thennetlify login
npm i -g sign-bunny fortune-node parrotsay
fun little cli utilities to usenpm i -g undollar
for removing $npm install -g npm-check-updates
for updating depssudo npm install -g trash-cli
to add atrash
command to so you dont permanently delete filesbrew install yarn --ignore-dependencies
- yarn notebrew install z
- doesnt work out of the box exactly - see my issue on the rupa/z repo - homebrew changed the default install path of the z.sh script so just make sure you are pointing to the right new path -. /opt/homebrew/etc/profile.d/z.sh
in your zshrcpip3 install --user powerline-status
git clone <https://github.com/powerline/fonts> && cd fonts && ./install.sh
Notes on other stuff we already brew installed
Setup Apps
install
smol menubar
- my app for chat apps!: https://github.com/smol-ai/menubarI hate Docker Desktop so i am using "docker" without it
sudo curl -L https://github.com/docker/compose/releases/download/v2.5.1/docker-compose-darwin-aarch64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
brew install --cask notunes
- so that you dont launch itunes/apple musicSelect any MP3 file, Press "Command+i", Change "Open with:" to VLC, Click the "Change All…" button. Tada.
download Audacity - and install ffmpeg for audacity - the instructions are intentionally opaque - just go to https://lame.buanzo.org/#lameosx64bitdl and download and run the pkg - Audacity will detect it from there
Emojis: I used to use https://matthewpalmer.net/rocket/ but now I just use the naive Mac emoji picker (hit Fn key)
Privacy unfucker: Pure Paste from Sindre Sorhus
Password Manager: I use 1password for company and lastpass for personal
Window Manager: https://rectangleapp.com/ (there's mild history w/ spectacle/magnet but they're basically the same thingz. 2024: try https://github.com/MrKai77/Loop open source)
Screenshots: https://shottr.cc/ (shottr does OCR, but you may like a dedicated OCR utility)
Superhuman for Mac and https://mail.superhuman.com
Clipboard Manager: I now just use the one that comes with Alfred since I bought a lifetime upgrade a while ago. has good search and images, and can add snippets.
App Quitter: https://swiftquit.com/ (Close Mac Applications Automatically When Their Windows Close)
Loom: https://www.loom.com/desktop
Zoom: https://zoom.us/download
Caffeine (Keep Mac awake for talks): https://intelliscapesolutions.com/apps/caffeine
QuickShade (mac app controlled brightness)
NoTunes - disable itunes/apple music
Stuff I no longer use often but will bring in when i have the need
Chat: Slack and Discord
Note taking:
Stretchly: https://hovancik.net/stretchly/
Replay: download
App Search/Utils: https://www.alfredapp.com/
Editor: Download VS Code (I used to use Insiders but the popups are super annoying). use Settings Sync to sync across machines
"editor.bracketPairColorization.enabled": true
Screenflow 9 download
Other good "new laptop setup" lists: