Skip to content

macOS

Getting started

A brief guide for setting up macOS with essential developer tools, including Xcode command line tools, nvm, pnpm and Homebrew. Follow step-by-step instructions to install, configure and update your development environment efficiently.

References


  1. Xcode command line tools

    Terminal window
    xcode-select --install
  2. nvm

    Terminal window
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
  3. pnpm

    Terminal window
    curl -fsSL https://get.pnpm.io/install.sh | sh -
  4. Download apps


  5. Homebrew

    Install

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

    Add packages

    Terminal window
    brew install ffmpeg jq bat gh pipx zsh-autosuggestions zsh-syntax-highlighting
    • ffmpeg: A complete, cross-platform solution to record, convert and stream audio and video.

    • jq: A lightweight and powerful command-line JSON processor for parsing, filtering and transforming JSON data.

    • bat: a cat clone with syntax highlighting, Git integration and other useful features.

    • gh: official GitHub CLI tool for managing repositories, pull requests, issues and more from the terminal.

    • pipx: tool to install and run Python applications in isolated environments, keeping them separate from system-wide Python packages.

    • zsh-autosuggestions: zsh plugin that provides command-line suggestions based on history and completions.

    • zsh-syntax-highlighting: zsh plugin that adds syntax highlighting to the terminal, improving readability and reducing mistakes.

  6. Update git and shell configs

    Quick install

    Terminal window
    bash <(curl -fsSL https://raw.githubusercontent.com/huffmanks/config-stash/main/scripts/get-dotfiles.sh)

    Custom install (with exports)

    Terminal window
    bash <(curl -fsSL https://raw.githubusercontent.com/huffmanks/config-stash/main/scripts/get-dotfiles.sh) -- --exports all
    Terminal window
    bash <(curl -fsSL https://raw.githubusercontent.com/huffmanks/config-stash/main/scripts/get-dotfiles.sh) -- --exports docker nvm pnpm

    Config options

    FlagDescription
    —exportsAdd exports to .zshrc
    allEnable every tool listed below
    bunBun environment exports
    dockerDocker aliases and paths
    goGo (GOPATH/bin) exports
    java-android-studioJava and Android Studio paths
    nvmNode Version Manager config
    pipxPipx binary paths
    pnpmPNPM home and path config
  7. Compile shell

    Terminal window
    zcompile ~/.zshrc && zcompile ~/.zprofile && exec zsh
    • zcompile precompiles .zshrc and .zprofile into a binary format .zshrc.zwc and .zprofile.zwc.
    • exec zsh fully restarts the shell session and clears any temporary shell variables or functions.
    • When zsh starts, it loads the .zwc files instead of parsing the original files, reducing startup time.