# macOS Setup

Get Homebrew, Node.js, git, and a proper terminal — everything you need before running the [installer](../README.md#install).

> Already have Node.js ≥ 18, npm, and git? Skip straight to [Install](../README.md#install).

## 1. Open Terminal

Press **⌘ Space**, type **Terminal**, and hit Enter. Everything below happens in this window.

## 2. Install Xcode Command Line Tools

This gives you `git`, compilers, and other basics that macOS doesn't ship out of the box:

```bash
xcode-select --install
```

A popup will appear — click **Install** and wait (a few minutes). If it says "already installed", you're good.

## 3. Install Homebrew

[Homebrew](https://brew.sh) is the standard macOS package manager. Paste this into Terminal:

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

Follow the on-screen instructions. When it finishes, it will tell you to run one or two commands to add Homebrew to your PATH — **do that**. Then verify:

```bash
brew --version
```

## 4. Install Node.js & npm

npm (the package manager) comes bundled with Node.js:

```bash
brew install node
```

Verify both:

```bash
node --version   # should be ≥ 18
npm --version
```

## 5. Install git (if missing)

The Xcode CLI tools usually include git. Check:

```bash
git --version
```

If it's not found, install it:

```bash
brew install git
```

## 6. Get a terminal with truecolor support

The default macOS **Terminal.app does not support truecolor** and will show visual glitches. Install one of these instead:

| Terminal                                   | Install                         |
| ------------------------------------------ | ------------------------------- |
| [Ghostty](https://ghostty.org/)            | `brew install --cask ghostty`   |
| [iTerm2](https://iterm2.com/)              | `brew install --cask iterm2`    |
| [WezTerm](https://wezfurlong.org/wezterm/) | `brew install --cask wezterm`   |
| [Kitty](https://sw.kovidgoyal.net/kitty/)  | `brew install --cask kitty`     |
| [Alacritty](https://alacritty.org/)        | `brew install --cask alacritty` |

Pick one, install it, then **use that terminal for everything below**.

---

✅ Done — head back to [Install](../README.md#install).
