Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mac_setup

Reproducible setup for a fresh Apple Silicon Mac used for analytics engineering, data engineering, and day-to-day development.

This repo turns my Mac setup into code: Homebrew packages, terminal tooling, Zsh configuration, Cursor keybindings, formatting shortcuts, Git helpers, and setup notes.

mac_setup demo

One script, and a brand new Mac is a fully-loaded analytics engineering machine before your coffee's done.

What this repo installs

Core

  • Apple Command Line Tools
  • Homebrew
  • Git + GitHub CLI
  • uv
  • AWS CLI
  • Terraform
  • Snowflake CLI (snow)
  • SnowSQL (snowsql)
  • Oh My Zsh
  • zsh-autosuggestions
  • zsh-syntax-highlighting

Terminal workflow

  • Warp
  • zoxide
  • eza
  • lazygit
  • fzf
  • ripgrep
  • bat
  • jq
  • tree
  • wget
  • lzop

Development apps

  • Cursor
  • Codex CLI
  • Claude Code
  • OrbStack
  • Raycast
  • Rectangle
  • 1Password
  • DBeaver
  • Obsidian

Python / SQL tooling

  • Black
  • SQLFluff

Setup philosophy

macOS
├── Xcode Command Line Tools
├── Homebrew
│   ├── CLI packages
│   └── GUI apps
├── Warp
│   └── zsh
│       └── Oh My Zsh
│           ├── Jonathan theme
│           ├── zsh-autosuggestions
│           ├── zsh-syntax-highlighting
│           ├── zoxide
│           └── personal aliases/functions
├── Cursor
│   ├── extensions.txt
│   ├── keybindings.json
│   └── tasks.json
├── uv
│   ├── Python versions
│   └── global CLI tools
├── AWS CLI
├── Terraform
├── Snowflake
│   ├── snow (Snowflake CLI)
│   └── snowsql
├── DBeaver
├── Obsidian
├── docs/
│   ├── CLAUDE.md
│   ├── CODEX.md
│   ├── CURSOR.md
│   ├── EXTENSIONS.md
│   ├── MIGRATION_NOTES.md
│   ├── NEXT_LAYER.md
│   ├── SHORTCUTS.md
│   ├── SOURCES.md
│   └── TOOLS.md
└── OrbStack
    └── Docker

Fresh Mac install

1. Install Apple Command Line Tools

xcode-select --install

Verify after the installer finishes:

xcode-select -p
git --version

Expected developer tools path is normally:

/Library/Developer/CommandLineTools

2. Clone this repo

git clone https://github.com/MarkPhamm/mac_setup ~/mac_setup
cd ~/mac_setup

3. Bootstrap the machine

./scripts/bootstrap.sh

The bootstrap script:

  1. verifies Apple Command Line Tools
  2. installs Homebrew if missing
  3. runs the Brewfile
  4. installs Oh My Zsh
  5. installs the two external Zsh plugins
  6. installs Black and SQLFluff with uv tool

4. Link dotfiles

./scripts/link-dotfiles.sh
exec zsh

Existing dotfiles are backed up before links are created.

5. Configure Git / GitHub

./scripts/configure-git.sh
gh auth login

6. Install Cursor config

See docs/CURSOR.md.

./scripts/install-cursor-keybindings.sh
./scripts/install-cursor-extensions.sh

7. Set up Codex and Claude Code

See docs/CODEX.md and docs/CLAUDE.md.

8. Verify

./scripts/verify.sh

Common commands

refresh                 # source ~/.zshrc
ll                      # eza long listing
la                      # eza including hidden files
cd <partial-name>       # zoxide-powered smart navigation
lazygit                 # terminal Git UI
git lg                  # pretty Git graph
gitall "message"        # add, commit, push

sqfl model.sql          # SQLFluff lint
sqff model.sql          # SQLFluff fix

dbt_run model_name
dbt_test model_name
dbt_run_defer model_name
dbt_build_defer model_name

Important migration decisions

A few items from the old setup were intentionally cleaned up:

  • Warp, not iTerm2: Warp is the terminal used in the productivity stack.
  • Jonathan theme, not Powerlevel10k: the article mentions Powerlevel10k in prose, but the actual .zshrc shown uses ZSH_THEME="jonathan". This repo follows the actual config.
  • No employer-specific paths: old Insurify filesystem paths and hardcoded Docker container IDs are not part of the reusable config.
  • dbt state is configurable: aliases default to prod_dbt_artifacts, but use $DBT_STATE_DIR so a project can override it.
  • Manifest download is configurable: set $DBT_MANIFEST_URL instead of hardcoding a company URL.

See docs/MIGRATION_NOTES.md for details.

Current rebuild status

As of the fresh M4 Mac rebuild on 2026-08-19:

  • Fresh Mac booted
  • xcode-select --install requested
  • Command Line Tools installation verified
  • Homebrew verified
  • Oh My Zsh installed
  • Brew bundle installed
  • Dotfiles linked
  • GitHub authenticated
  • Cursor configuration restored
  • Final verification completed

Update this checklist as the machine is rebuilt.

Repo structure

mac_setup/
├── Brewfile
├── Makefile
├── README.md
├── cursor/
│   ├── extensions.txt
│   ├── keybindings.json
│   └── tasks.json
├── docs/
│   ├── CLAUDE.md
│   ├── CODEX.md
│   ├── CURSOR.md
│   ├── EXTENSIONS.md
│   ├── MIGRATION_NOTES.md
│   ├── NEXT_LAYER.md
│   ├── SHORTCUTS.md
│   ├── SOURCES.md
│   └── TOOLS.md
├── scripts/
│   ├── bootstrap.sh
│   ├── configure-git.sh
│   ├── install-cursor-extensions.sh
│   ├── install-cursor-keybindings.sh
│   ├── link-dotfiles.sh
│   └── verify.sh
└── zsh/
    ├── .zshrc
    └── aliases.zsh

Source

The workflow is reconstructed from my existing setup plus my article:

The Productivity Stack I Actually Use as an Analytics Engineer
Mark Pham, March 17, 2026.

The article is useful as the human explanation; this repo is the executable version.

About

If I had to set up my mac from scratch

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages