Index

New Laptop Setup

Steps to get a fresh Mac ready for development — Terminal, Homebrew, SSH keys, and essentials.

Developer folder

mkdir a "Developer" folder at ~ to store all GitHub/GitLab repos.

Terminal setup

Set up SSH with GitLab

Follow instructions here: https://docs.gitlab.com/user/ssh/

Install Homebrew

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 Node.js using version manager

Install fnm via Homebrew:

brew install fnm

Verify:

fnm --version

Configure fnm in your shell

fnm must be loaded every time your terminal starts.

echo 'eval "$(fnm env --use-on-cd)"' >> ~/.zshrc

Reload your shell:

source ~/.zshrc

Install Node.js

Install the latest LTS (recommended):

fnm install --lts

Set it as the default:

fnm default lts-latest

Activate it:

fnm use lts-latest

Verify Node is running natively on ARM

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.

Confirm everything is wired correctly

Restart your terminal and run:

which node

Expected output:

/opt/homebrew/bin/node

or a path inside .fnm

This confirms fnm controls Node.

Install pandoc and xelatex

Install pandoc (via Homebrew)

Install using Homebrew:

brew install pandoc

Verify:

pandoc --version

Install XeLaTeX (via MacTeX)

XeLaTeX is part of MacTeX. Install the minimal version (recommended):

brew install --cask mactex-no-gui

Verify:

xelatex --version

Ensure TeX binaries are on PATH

Add TeX Live to your shell:

echo 'export PATH="/Library/TeX/texbin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Verify:

which xelatex

Expected:

/Library/TeX/texbin/xelatex

Install system fonts (optional but recommended)

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"

Confirm native ARM installation

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