Skip to main content

New Laptop Setup

This is a guide to setting up an XMTP developer environment on your new Macbook.

It is opinionated, and mostly reflects the preferences of Nick Molnar. YMMV.

Shell Environment​

  1. Ensure Xcode Command Line tools are installed by running xcode-select --install

  2. Download and install iTerm 2 or Warp

  3. (optional) Set your old mac to sync iTerm 2 preferences to a folder in preferences/general/preferences. Copy those preferences to your new mac, and configure to point to the same folder.

  4. xcode-select --install

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

  6. Install rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

  7. Install a bunch of dependencies via Homebrew

    brew install nvm go python3 doctl hub bufbuild/buf/buf
  8. Create a .zshrc file. I use oh-my-zsh, which requires a separate installation. Here is my .zshrc:

     # If you come from bash you might have to change your $PATH.
    export PATH="$HOME/bin:/usr/local/bin:$HOME/.cargo/bin:$PATH"

    # Path to your oh-my-zsh installation.
    export ZSH="$HOME/.oh-my-zsh"

    # Set name of the theme to load. Optionally, if you set this to "random"
    # it'll load a random theme each time that oh-my-zsh is loaded.
    # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
    ZSH_THEME="robbyrussell"

    # # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
    # # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
    # # Example format: plugins=(rails git textmate ruby lighthouse)
    # # Add wisely, as too many plugins slow down shell startup.
    plugins=(
    git
    z
    )

    source $ZSH/oh-my-zsh.sh

    # Aliases
    alias git="/opt/homebrew/bin/hub"

    # Homebrew shellenv
    eval "$(/opt/homebrew/bin/brew shellenv)"
    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
    [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
  9. Source your new .zshrc with source ~/.zshrc.

  10. Install the node version found in xmtp/xmtp-js/.nvmrc by running nvm install $version. Set it as the default by running nvm alias default $versionYouJustInstalled.

  11. Setup an account on Docker Hub and request to be linked to the organization account in Slack (#team-eng).

  12. Install Docker For Mac, and login to your account using docker login.

  13. Create a new SSH key, and add it to your GitHub. Instructions here

  14. Force git to use your new SSH key:

git config --global url."git@github.com:".insteadOf "https://github.com/"