DEV Community

loading...
Cover image for My 2021 New Mac Setup

My 2021 New Mac Setup

swyx
Infinite Builder πŸ‘·πŸ½β€β™‚οΈ I help people Learn in Public β€’ Author, the Coding Career Handbook (https://learninpublic.org)
Originally published at swyx.io ・Updated on ・8 min read

I set up a new Mac for work today. Here's everything I use on a Mac for fullstack web development.

Unlike Mina Markham, I choose not to automate my setup because I only do it about once a year and I want the ability to make conscious changes each time.

I previously tracked my new mac setup in an old version of this page from 2018-2020.

1hr Video Walkthrough


OS/Browser Settings

Setup Terminal

Set up apps/environments

  • Install Homebrew - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    i have a bunch more stuff in brew list but i'm not sure what i use actively. You can mass install these: brew install $(cat packages.txt)

    bat             gdbm            libuv           python@3.9
    brotli          gh              libyaml         readline
    c-ares          go              mpdecimal       ruby
    deno            gradle          nghttp2         sqlite
    diff-so-fancy   icu4c           node            xz
    fnm             jemalloc        openjdk         yarn
    fzf             libev           openssl@1.1     z
    
  • brew install bat

  • Github CLI: brew install github/gh/gh

    • you need to login to git - if you have 2fa enabled, you cant use your normal github password. try pushing to a repo and enter in a Personal Access Token for password.
    • then run gh auth login
    • add GitHub SSH key (not optional)
  • brew install fzf - fuzzy finder - usage example is here

  • brew install node

    • Node.js/NPM
    • npm login
    • sudo npm install netlify-cli -g
    • npm i -g sign-bunny fortune-node parrotsay
    • npm install -g undollar for removing $
    • sudo npm install -g @aws-amplify/cli
    • amplify configure
    • sudo npm install -g trash-cli
  • brew install yarn --ignore-dependencies - yarn note

  • you may need to work around Mac OS Sierra

  • brew install z - REALLY GOOD TRY IT

  • Misc

    • pip3 install --user powerline-status
    • go to a neutral folder and git clone <https://github.com/powerline/fonts> && cd fonts && ./install.sh
    • fnm faster alternative to nvm: curl -fsSL <https://fnm.vercel.app/install> | bash or brew install fnm
    • Anaconda Python distro - be careful they tend to [modify your bash prompt without asking](https://askubuntu.com/questions/1026383/why-does-base-appear-in-front-of-my-terminal-prompt\)
    • Docker Desktop
    • brew install ffmpeg and then
    • download Audacity - and install ffmpeg
    • brew install java - you could download Java Development Kit from Oracle but fuck them for putting it behind signup wall
    • brew install go you may need to export PATH=$PATH:/usr/local/go/bin
    • brew install diff-so-fancy - then set git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" - makes for much nicer git diff
      • You can also diff with this bash function dif() { git diff --color --no-index "$1" "$2" | diff-so-fancy; } or with VSCode code --diff file1.js file2.js.
      • You can also try https://github.com/dandavison/delta

Setup Apps


Other good "new laptop setup" lists:

Discussion (12)

Collapse
fhiegel profile image
Fabien Hiegel

Thank you for the share !

I have some other tools I prefers :

I use SdkMan (sdkman.io) for install java, and managing my different java versions

I use "Rectangle" instead of "Spectacle" for managing windows, installed from brew

brew install --cask rectangle
Enter fullscreen mode Exit fullscreen mode

I use "CopyQ" instead of "clippy-app" for clipboard manager

brew install --cask copyq
Enter fullscreen mode Exit fullscreen mode

Note : the link to your dotfiles gists, is pointing to a Notions workspace
Note2 : thank you for all your "Learn In Public" resources

Collapse
dailydevtips1 profile image
Chris Bongers

Nice Shawn!

Very complete list, took some inspiration from this as I'm currently building a new brew formula to do most of this for me when I'm reinstalling my Mac again.

Also going to give Z a shot πŸ‘

Collapse
preslavrachev profile image
Preslav Rachev

That's a nice one. I have recently started my own long-term project in the same direction. I am collecting about a decade of knowledge and insider tips into a (won't call it a book yet) scrapbook of sorts. I have released a very early version of on Gumroad: p5v.gumroad.com/l/setting-up-your-mac Anyone generous enough to back my little project at this stage will enjoy its full value over time. Thanks!

Collapse
trimud profile image
Yuriy Boev

Why do you need another app for clipboard history when you have this built in in Alfred already?

Collapse
trimud profile image
Yuriy Boev

Why do you need another app for clipboard history when you have this built in in Alfred already?

Collapse
trimud profile image
Yuriy Boev

Why do you need another app for clipboard history when you have this built in in Alfred already?

alfredapp.com/help/features/clipboard

Collapse
trimud profile image
Yuriy Boev

Why do you need another app for clipboard history when you have this built in in Alfred already?

alfredapp.com/help/features/clipbo...

Collapse
bramus profile image
Bramus!

To automate (most of) these steps I created github.com/bramus/freshinstall that does the job for me. Might need a few tweaks to continue working with the latest macOS/etc versions.

Collapse
swyx profile image
swyx Author

looks very handy! thx for sharing!

Collapse
horacioh profile image
Horacio Herrera

I use a dotfile to setup almost everything!
github.com/horacioh/dotfiles/blob/...

there are a lot of people with this mode, you can search for repos named β€œdotfiles”

Collapse
brucebentley profile image
Bruce Bentley

Do you have all of this configured in a dotfiles repo somewhere?

Collapse
bill_magnet profile image
Bill Manget

Cant believe I just spent one hour watching this dude install bunch of stuff.. Seems like wathcing someone install uBlock Origin is my new drug :) Great video nonetheless!