Everything you need to run modern AI tools on a Mac — Claude Code, Codex, Gemini, Tailscale, and Ollama. Do it once, then repeat on every machine.
Works on Apple Silicon (M1/M2/M3/M4) and Intel Macs. You'll mostly be typing into a window called the Terminal — don't worry, every command is here to copy.
Terminal is the Mac's command window — it's already built in. Homebrew is the Mac's package manager: it downloads and installs software with one line, so you don't hunt for download buttons.
Why this first: every tool below installs through the Terminal. Get comfortable here and the rest is copy-paste.
Open the TerminalPress Cmd+Space to open Spotlight, type Terminal, and press Enter. That's it — it's already installed on every Mac. (Later, if you want a fancier terminal, you can install iTerm2 with Homebrew: brew install --cask iterm2. Totally optional.)
Paste this whole line into the Terminal and press Enter. It will ask for your Mac login password (you won't see the characters as you type — that's normal) and may take a few minutes.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
When it finishes, it prints a short "Next steps" section with exactly two lines to copy. Run those two lines — they add Homebrew to your PATH so the brew command works (on Apple Silicon Macs they point to /opt/homebrew/bin).
brew --version prints a version like Homebrew 4.x.brew install node
Then confirm both are there:
node --version npm --version
v22.x.x and 10.x.x).Anthropic's AI coding agent — the same kind of assistant that built this page. It lives in your Terminal, reads and edits real files, and runs commands for you.
Why you want it: it does actual multi-step work (build a site, fix a script, organize files), not just chat.
InstallThe simplest way on a Mac is through npm (which you just installed with Node):
npm install -g @anthropic-ai/claude-code
There's also a native one-line installer if you prefer:
curl -fsSL https://claude.ai/install.sh | bashStart it & log in
Go into any folder you want to work in, then launch:
claude
The first run opens your browser to sign in to your Anthropic account (a Claude subscription or API credit). After that, just type what you want in plain English.
claude --version prints a version, and typing claude drops you into a prompt that greets you.OpenAI's command-line coding agent. Same idea as Claude Code, different brain — handy as a second opinion or when you've used up one tool's quota.
Why you want it: variety. Different models are stronger at different things; having both means you're never stuck.
Installnpm install -g @openai/codex
Or, if you'd rather install it with Homebrew:
brew install codexStart it & log in
codex
First run lets you sign in with your ChatGPT/OpenAI account (or an API key). Then describe what you want, same as Claude.
codex --version prints a version and codex opens its prompt.Google's command-line AI agent. Notable for a very generous free tier and an enormous memory (context window) for long documents.
Why you want it: free headroom. Great for big, sprawling tasks before you spend on the others.
Installnpm install -g @google/gemini-cliStart it & log in
gemini
First run opens your browser to sign in with a Google account. The free tier is large — you likely won't pay anything to start.
gemini --version prints a version and gemini opens its prompt.A coding agent from Nous Research — "the agent that grows with you." Same idea as Claude Code, Codex, and Gemini, with two twists: it's self-improving (it learns your preferences over time), and it's model-agnostic — you point it at whichever brain you want (Nous, OpenAI, Anthropic, OpenRouter, and more).
Why you'd add it: it's a fourth tool in the rotation and the most model-flexible of the bunch — handy for staying un-locked-in (see the future-proofing principles).
InstallOn the Mac it installs natively — no WSL2 or extra layer needed. Run the one-line installer in Terminal; it sets up everything it needs (Python, Node.js, ripgrep, ffmpeg):
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bashAlternative: with pip
pip install hermes-agent hermes postinstall
hermes postinstall pulls in the extra pieces (Node.js, browser, ripgrep, ffmpeg) and runs the setup wizard.
hermes setup # configure it the first time hermes --tui # start it (modern terminal UI, recommended)
During setup it asks how you want to sign in — an API key, or an OAuth login via hermes setup --portal. It works with the Nous Portal, OpenAI, Anthropic, OpenRouter, and others, so you can reuse an account you already have.
hermes --version prints a version, and hermes --tui opens its interface.A private network (a "mesh VPN") that connects all your devices to each other securely — your Macs, your PCs, your phone, your NAS — as if they were in the same room, from anywhere in the world.
Why you want it: this is the glue. Once every device is on Tailscale, you can reach any of them — to share one Ollama for the whole house, or to control a Mac from your phone (see the iOS and Android guides).
Install (the easy menu-bar app)brew install --cask tailscale
This installs the friendly menu-bar app. (It's also available free on the Mac App Store if you'd rather install it that way.)
Sign inAfter install, a Tailscale icon appears in the menu bar (top-right). Click it → Log in, and sign in with the same account on every device so they all join one private network.
tailscale status — it lists this machine and any others already signed in, each with a 100.x.y.z address. (With the cask app, the command lives inside /Applications/Tailscale.app.)hs-mac-mini).Runs AI models on your own Mac instead of the cloud — free, private, and works offline. Good for chat, summarizing, and coding help without a subscription.
Why you want it: no per-use cost, nothing leaves your machine, and combined with Tailscale (Step 5) one capable Mac can serve models to your phone and every other device.
Installbrew install ollama
Or download the app directly from ollama.com/download/mac.
Start the serviceIf you installed with Homebrew, start it in the Terminal:
ollama serve
(If you downloaded the app instead, it runs automatically — you can skip this.)
Download and run your first modelOpen a new Terminal window and pull a small, capable model:
ollama run llama3.2
The first run downloads the model (a couple of GB), then you can chat right in the Terminal. Type /bye to leave.
>>> prompt and answers a question you type.llama3.2 and only go bigger if it stays smooth.launchctl setenv OLLAMA_HOST "0.0.0.0:11434", then restart Ollama. Other devices reach it at this Mac's Tailscale address on port 11434.This Mac can now run three cloud AI agents, sits on your private Tailscale network, and serves local models with Ollama. Repeat steps 2–6 on your other Macs — it goes fast once you've done one.