My 2021 New Mac Setup

swyx - Jul 5 '21 - - Dev Community

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

  • Copy my dotfiles (vimrc, zshrc, .gitignore_global): https://gist.github.com/sw-yx/7fa1009e460ecb818d5e6d9ca4616a05
  • Install ZSH (first usage of git will prompt you to install git - takes 15 minutes)

    • git config --global init.defaultBranch main
    • git config --global user.name "swyx"
    • git config --global user.email shawnthe1@gmail.com

  • Hyper Terminal

    • settings: shell: '/bin/zsh'
    • settings: fontFamily: '"Inconsolata for Powerline", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
    • Fig - context-aware autocomplete for terminal. Waitlisted now, but you can skip the waitlist here (i get nothing from this)
      • More CLI tools recommended by Brendan Faik (founder of Fig) - bat, exa, ripgrep, and other Rust CLI alternatives. Also zsh abbreviations
      • More CLI tools from Earthly - HN here
        • broot - a better tree
        • funky - simple shell functions
        • fzf - fuzzy finder
        • mcfly - guesses commands based on your history
        • zoxide - a better cd
        • gitupdate - use file names to create a more meaningful commit message

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 update on m1's have turned out to be super annoying. this helped me: arch -x86_64 brew install YOUR_PACKAGE

  • 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
    • npm config set loglevel
    • sudo npm install netlify-cli -g
    • npm i -g sign-bunny fortune-node parrotsay
    • npm install -g undollar for removing $
    • 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

Setup Apps


Other good "new laptop setup" lists:

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player