Steps to get a fresh Mac ready for development — Terminal, Homebrew, SSH keys, and essentials.
mkdir a "Developer" folder at ~ to store all GitHub/GitLab repos.
Follow instructions here: https://docs.gitlab.com/user/ssh/
Check if Homebrew exists:
brew --version
If not installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After installation, ensure Homebrew is in your shell:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Install fnm via Homebrew:
brew install fnm
Verify:
fnm --version
fnm must be loaded every time your terminal starts.
echo 'eval "$(fnm env --use-on-cd)"' >> ~/.zshrc
Reload your shell:
source ~/.zshrc
Install the latest LTS (recommended):
fnm install --lts
Set it as the default:
fnm default lts-latest
Activate it:
fnm use lts-latest
Check versions:
node -v
npm -v
Check architecture:
node -p "process.arch"
Expected output:
arm64
If you see x64, your terminal is running in Rosetta. Open the normal Terminal.app (not “Open using Rosetta”) and repeat the setup.
Restart your terminal and run:
which node
Expected output:
/opt/homebrew/bin/node
or a path inside .fnm
This confirms fnm controls Node.
Install using Homebrew:
brew install pandoc
Verify:
pandoc --version
XeLaTeX is part of MacTeX. Install the minimal version (recommended):
brew install --cask mactex-no-gui
Verify:
xelatex --version
Add TeX Live to your shell:
echo 'export PATH="/Library/TeX/texbin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Verify:
which xelatex
Expected:
/Library/TeX/texbin/xelatex
XeLaTeX uses macOS fonts directly. Install high-quality fonts:
brew install --cask font-noto-serif-cjk
brew install --cask font-noto-sans
Use them in Pandoc:
pandoc input.md -o out.pdf \
--pdf-engine=xelatex \
-V mainfont="Noto Serif" \
-V CJKmainfont="Noto Serif CJK JP"
file $(which pandoc)
file $(which xelatex)
Both should show arm64. If you see x86_64, your terminal is running under Rosetta.
Last updated: 19-05-2026 at 08:28