Who this is for
You want a clean, repeatable dev setup on macOS. You want fast installs, predictable updates, and a workflow for shipping real projects. By the end, you will have a working pipeline from your laptop to a live URL.
What you will set up
- iTerm2 for a better terminal
- Oh My Zsh for shell productivity
- Homebrew for tool management
- Git (latest, via Homebrew) for version control
- SSH keys for secure GitHub access
- nvm for Node.js version management
- VS Code with 9 extensions and a tuned settings file
- A deploy pipeline from GitHub to Vercel, with preview URLs on every PR
Before you start
Update macOS and restart. Open Terminal once to clear first-run prompts.
1. iTerm2
iTerm2 replaces the default Terminal with split panes, search, profiles, and deep customisation. You spend hours in a terminal each week. A better terminal pays off fast.
Install with Homebrew (section 3 below):
brew install --cask iterm2
Set iTerm2 as your default terminal app.
2. Oh My Zsh
macOS ships with Zsh. Oh My Zsh adds a plugin system and better defaults.
Install:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Open ~/.zshrc:
open ~/.zshrc
Set plugins:
plugins=(git node npm macos vscode)
| Plugin | Purpose |
|---|---|
git |
150+ aliases: gst for git status, gco for git checkout
|
node |
Completions for Node.js commands |
npm |
Aliases and completions for npm |
macos |
macOS helpers: ofd opens Finder in the current directory |
vscode |
vsc alias to open files in VS Code |
Reload:
source ~/.zshrc
Small efficiencies compound. gst instead of git status saves seconds you reclaim thousands of times.
3. Homebrew
Homebrew makes your macOS setup repeatable. Install, update, and remove tools with one command. No random .dmg downloads. No version guessing.
Install:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add Homebrew to your PATH.
Apple Silicon (M1/M2/M3/M4):
eval "$(/opt/homebrew/bin/brew shellenv)"
Intel:
eval "$(/usr/local/bin/brew shellenv)"
Reload and verify:
source ~/.zshrc
brew --version
From this point, check Homebrew for a package before downloading anything manually.
4. Git
Every deploy starts with a commit. Install Git via Homebrew. The macOS default ships an older release through Xcode Command Line Tools.
brew install git
Verify:
git --version
which git
# Apple Silicon: /opt/homebrew/bin/git
Set your identity and defaults:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main
git config --global core.editor "code --wait"
git config --global pull.rebase false
git config --global push.autoSetupRemote true
git config --global rerere.enabled true
| Setting | What you get |
|---|---|
init.defaultBranch main |
Every new repo starts on main, the modern default |
core.editor "code --wait" |
Git opens VS Code for commit messages and waits for you to save |
pull.rebase false |
Merges on pull, keeps history straightforward |
push.autoSetupRemote true |
First push on a new branch works without --set-upstream
|
rerere.enabled true |
Git remembers conflict resolutions and reapplies them |
Verify:
git config --global --list
5. SSH keys for GitHub
SSH gives you secure, token-free Git operations. One setup, zero password prompts.
Generate an ed25519 key:
ssh-keygen -t ed25519 -C "you@example.com"
Accept the default path. Set a strong passphrase.
Create the SSH config:
mkdir -p ~/.ssh
touch ~/.ssh/config
open ~/.ssh/config
Add:
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
Add the key to Keychain:
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Copy the public key:
pbcopy < ~/.ssh/id_ed25519.pub
Paste at github.com/settings/keys > New SSH key.
Test:
ssh -T git@github.com
# Expected: "Hi username! You've successfully authenticated..."
6. Node.js with nvm
Different projects need different Node versions. nvm lets you install and switch between them instantly.
Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Reload and verify:
source ~/.zshrc
nvm --version
Install Node LTS (Long-Term Support) and set the default:
nvm install --lts
nvm alias default node
Verify:
node --version
npm --version
Enable Corepack for pnpm later:
corepack enable
Node.js runs your code. npm manages your dependencies. Both install together, but they serve different roles.
7. VS Code
A tight edit-format-lint-commit loop makes you faster. VS Code with a focused config gets you there.
Install the code CLI:
- Open VS Code
- Press Cmd + Shift + P
- Run "Shell Command: Install 'code' command in PATH"
Test:
code --version
code .
Install 9 extensions from the terminal:
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension bradlc.vscode-tailwindcss
code --install-extension formulahendry.auto-rename-tag
code --install-extension christian-kohler.path-intellisense
code --install-extension usernamehw.errorlens
code --install-extension eamodio.gitlens
code --install-extension GitHub.copilot
code --install-extension astro-build.astro-vscode
| Extension | Purpose |
|---|---|
| ESLint | Catches code errors in real time |
| Prettier | Auto-formats on save |
| Tailwind CSS IntelliSense | Autocomplete for Tailwind classes |
| Auto Rename Tag | Renames closing tags when you edit opening tags |
| Path Intellisense | Autocompletes file paths in imports |
| Error Lens | Shows errors inline, next to the code |
| GitLens | Shows who changed each line and when |
| GitHub Copilot | AI pair programmer |
| Astro | Syntax highlighting and IntelliSense for .astro files |
Open User Settings (JSON) with Cmd + Shift + P > "Preferences: Open User Settings (JSON)":
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"files.autoSave": "onFocusChange",
"editor.stickyScroll.enabled": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.minimap.enabled": false,
"editor.wordWrap": "on",
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.fontFamily": "MesloLGS NF",
"files.associations": { "*.astro": "astro" },
"emmet.includeLanguages": { "astro": "html" },
"eslint.validate": ["javascript", "typescript", "astro"],
"[astro]": { "editor.defaultFormatter": "astro-build.astro-vscode" },
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"git.confirmSync": false,
"git.autofetch": true,
"git.enableSmartCommit": true,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"telemetry.telemetryLevel": "off"
}
Key settings:
-
formatOnSaveformats code every time you save -
autoSave: onFocusChangesaves files when you click away -
stickyScrollpins parent scopes as you scroll -
bracketPairColorizationcolour-codes matching brackets -
git.autofetchchecks GitHub for updates in the background
8. GitHub organisation
A GitHub organisation separates professional repos from personal experiments.
Create one at github.com/settings/organizations:
- Pick the free plan
- Choose a clean, lowercase name (e.g.
madebysami) - Set a contact email
Your repos live under one namespace. Clients, collaborators, and employers see a structured body of work.
9. First deploy: Astro to Vercel
This section proves the entire pipeline works end to end.
Create a workspace folder:
mkdir -p ~/Developer/madebysami
cd ~/Developer/madebysami
Scaffold an Astro project:
npm create astro@latest hello-world
cd hello-world
Choose: empty starter, TypeScript strict, install dependencies, init Git.
Run locally:
npm run dev
# Open http://localhost:4321
# Ctrl + C to stop
Create a hello-world repo on GitHub under your org. Do not add a README.
Commit and push:
git add .
git commit -m "feat: initial hello world project"
git remote add origin git@github.com:madebysami/hello-world.git
git push -u origin main
Deploy on Vercel:
- Sign up at vercel.com with GitHub
- Import your repo at vercel.com/new
- Vercel detects Astro and deploys
You get a live URL within 30 seconds. Your pipeline works.
10. Preview deploys with feature branches
All changes go through branches and PRs. Never commit to main directly.
git checkout -b feat/add-styling
# Make changes
git add .
git commit -m "style: add gradient heading"
git push
Open a pull request on GitHub. Vercel posts a preview URL on the PR. Review the preview. Merge. Vercel redeploys main.
Every PR gets a free staging environment. Professional teams pay for this workflow. You get the same at zero cost.
11. Config files to copy
~/.ssh/config:
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
.gitignore:
node_modules/
dist/
.env
.env.*
.DS_Store
.vscode/settings.json
.vercel
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.prettierrc:
{
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100
}
eslint.config.js:
import eslintPluginAstro from 'eslint-plugin-astro'
export default [
...eslintPluginAstro.configs.recommended,
{ rules: {} },
]
12. Screenshots to include
Add screenshots to prove the pipeline works and make the post shareable:
- iTerm2 with split panes and your devstats output
-
git config --global --listshowing your full setup -
ssh -T git@github.comsuccess output -
node --versionandnpm --version - Your GitHub repo with commits and a PR
- Your Vercel dashboard with the deployment
- The live URL in a browser
13. Final checklist
- [ ] Homebrew installs and updates tools
- [ ]
which gitpoints to Homebrew Git - [ ]
ssh -T git@github.comauthenticates - [ ]
nvm --versionandnode --versionwork - [ ] VS Code formats on save
- [ ] Astro dev server runs at localhost:4321
- [ ]
git pushreaches GitHub - [ ] Vercel deploys on push to
main - [ ] PRs get Vercel preview URLs
Your environment is ready. Your pipeline is proven. Go ship something.
Top comments (0)