Dev Environment · Field Manual

One Mac.
Every AI Agent.
Fully Loaded.

From first boot to a multi-agent battle station. Works on every Apple Silicon Mac — MacBook, iMac, Mac Studio, Mac mini. This guide follows one iron rule: declare everything as code — Brewfile, dotfiles, bootstrap scripts — so a new machine is fully restored in 30 minutes. The terminal is the main battlefield, with Claude Code / Kimi Code / Codex / DSH / PI / WorkBuddy / ZCode running side by side, each playing to its strengths.

macOS · Apple Silicon Homebrew + Brewfile Ghostty · zsh · Starship mise + uv Multi-Agent Workflow
🤖 I'm an Agent — send me this prompt
Read https://x5.github.io/new-mac-setting/mac-mini-ai-dev-setup.md and set up this Mac
step by step. Prefer running setup.sh for the bulk install. Ask me before any
irreversible action.
🧑 I'm a Human — one-command setup
curl -fsSL https://x5.github.io/new-mac-setting/setup.sh | bash
Scroll
01
macOS Layer

System Initializationdefaults write

Enable FileVaultFileVault · Full-Disk EncryptionmacOS full-disk encryption. On Apple Silicon the data volume is encrypted by default; FileVault binds the decryption key to your login password — without logging in, nobody can read the disk. Your SSH private keys and API keys all depend on it as the last line of defense. Performance cost ≈ 0. Always turn it on, and keep the recovery key safe. disk encryption in the setup wizard; skip iCloud Desktop sync for now. Then use defaults writedefaults writeThe command-line interface to macOS preferences — reads and writes app settings directly. Scriptable and dotfiles-friendly: run it once on a new machine and every setting takes effect, no clicking through System Settings. to shape the system into developer form — all of it lives in your dotfilesdotfilesHidden config files starting with a dot (.zshrc, .gitconfig, .config/…). Managing them in a git repo = configuration as code; one command restores every setting on a new machine. See Chapter 13. and applies automatically on the next machine. Finally install the Xcode Command Line ToolsXcode CLTApple's standalone command-line developer tools package (git, clang, make, etc.) — no need to install the full Xcode. Homebrew and nearly every build toolchain depend on it., the prerequisite for every build toolchain.

zsh — system defaults
# Keyboard: fastest key repeat, shortest delay
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10

# Trackpad: tap to click
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true

# Finder: show extensions + status bar + path bar
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder ShowPathbar -bool true

# Dock: auto-hide, disable recent apps
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock show-recents -bool false

# Save screenshots to ~/Screenshots
mkdir -p ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots

killall Finder Dock
zsh — prerequisite
# Xcode Command Line Tools: prerequisite for git, clang and every build toolchain
xcode-select --install
02
Foundation

Homebrew: The Foundation of Everythingbrew

From this moment on, never install any dev software with a mouse again. Everything goes through brew install / brew install --cask and gets recorded in a Brewfile (see Chapter 13) — the core of "reproducible".

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

# Apple Silicon installs to /opt/homebrew by default; add it to PATH
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

brew update && brew doctor
03
Battle Station

Terminal & Shell: The Agent's War Roomghostty · starship

In the AI agent era, the terminal is the primary interface. Recommended stack: GhosttyGhostty · Terminal EmulatorProvides the window, rendering and interaction layer. GPU-accelerated rendering, a native macOS feel, and every setting in a single config file. (GPU rendering, natively fast) + zshzsh · Shell Command InterpreterEvery command you type (including the ones AI agents run) is parsed by the shell and handed to the system. The default macOS shell; all config lives in ~/.zshrc. Division of labor: Ghostty is the window, zsh is the "language" inside it, Starship is the prompt's appearance, Nerd Font draws the icons. + StarshipStarship · PromptA cross-shell prompt tool: renders the directory, git branch, Node/Python versions and command duration right in the prompt, configured with a single starship.toml. prompt + Nerd FontNerd Font · Icon FontA patched font family that adds thousands of icons on top of programming fonts. Starship, eza and friends rely on it to render icons — otherwise you get question-mark squares. icon font.

zsh — terminal stack
brew install --cask ghostty   # recommended; alternatives: wezterm / iterm2
brew install --cask font-jetbrains-mono-nerd-font
brew install starship zsh-autosuggestions zsh-syntax-highlighting

echo 'eval "$(starship init zsh)"' >> ~/.zshrc
~/.config/ghostty/config
font-family = JetBrainsMono Nerd Font
font-size = 14
theme = catppuccin-mocha
background-opacity = 0.96
window-padding-x = 12
window-padding-y = 10
copy-on-select = clipboard
Hands-on tip: Sections 1–2 (system settings + Homebrew) must be done by hand; from this section on, you can install Kimi Code first (curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash), hand it this document, and let the agent execute and verify chapter by chapter — the first real battle for this setup.
04
Runtimes

Runtime Management: mise + uvnode · python · go

Ditch nvm / pyenv / rbenv. misemise · One Manager for All Language VersionsDifferent projects need different Node / Python / Go versions; mise manages them all in one tool: declare versions in .mise.toml per project, auto-switch on cd, commit to git so the whole team stays on the same versions. Replaces nvm / pyenv / rbenv and the rest of the single-language managers. Phone analogy: mise manages the "OS version", uv manages "which apps to install". manages every runtime in one tool — auto-switches per project directory, versions live in .mise.toml shared with the team; uvuv · Python Package ManagerInstalls third-party libraries (openai, anthropic…). Written in Rust, 10–100× faster than pip. Automatically creates an isolated virtualenv per project so dependencies never clash; uv run executes scripts with the project environment. handles Python packages and virtualenvs, 10–100× faster than pip — the standard for AI projects.

zsh — mise + uv
brew install mise uv pnpm
echo 'eval "$(mise activate zsh)"' >> ~/.zshrc

mise use -g node@lts          # global default
mise use -g python@3.12
mise use -g go@latest

# In a project: mise use node@22 → generates .mise.toml, commit it to git
zsh — python workflow
uv init my-agent && cd my-agent
uv add openai anthropic           # add dependencies
uv run main.py                    # run a script (auto-uses the project venv)
uv run --with ruff ruff check .   # ephemeral tool, keeps the environment clean
05
Safety Net

Git & GitHub Toolchaingh · lazygit · delta

AI agents change code fast and in bulk — Git is your only safety net. Habits: commit before letting an agent touch anything; use git worktreegit worktree · Multiple Working TreesChecks out multiple branches of the same repo into different directories — independent working trees sharing one .git. The foundation of multi-agent parallelism: one worktree per agent, no stepping on each other. to run multiple agents in parallel without interference. Companion trio: ghgh · Official GitHub CLIManage issues / PRs / repos from the terminal; gh auth login signs in once and covers git push/pull authentication too. (official GitHub CLI), lazygitlazygit · Terminal UI for GitNo command memorization — stage, commit, branch, rebase and resolve conflicts entirely from the keyboard. After an agent rewrites a pile of code, it's the perfect review tool for walking diffs file by file and committing in batches. (terminal UI for Git), git-deltagit-delta · Diff RendererAdds syntax highlighting, line numbers and side-by-side view to git diffs. Enable it with pager = delta and it applies to git diff / git log / lazygit views. lazygit handles the "doing", delta handles the "display". (pretty diff renderer).

zsh — git toolchain
brew install git gh lazygit git-delta
gh auth login   # browser authorization; covers git push auth in one go
~/.gitconfig
[core]
    editor = code --wait
    pager = delta               # syntax-highlighted diffs
[merge]
    conflictstyle = zdiff3
[pull]
    rebase = true
[alias]
    lg = log --graph --oneline --decorate --all
    st = status -sb
06
Toolbox

Modern CLI Toolboxthe rust tool family

A set of modern replacements rewritten in Rust/Go. ripgrep is the underlying search engine agents use to search code; the rest speed up everything you do daily. All cross-platformCross-platform noteEvery tool in this chapter is written in Rust/Go — install the same set on Windows with winget / scoop, identical commands. The macOS-only items in this guide are: Homebrew, Ghostty, zsh, Raycast-style productivity apps, OrbStack — their Windows counterparts are winget, Windows Terminal, PowerShell 7, PowerToys, and Docker Desktop + WSL2., so you can practice on Windows in advance.

zsh — modern cli
brew install ripgrep fd bat eza fzf zoxide jq yq sd httpie \
  hyperfine dust duf bottom tlrc

# ~/.zshrc additions
eval "$(zoxide init zsh)"
source <(fzf --zsh)
alias ls='eza --icons' cat='bat --style=plain'
ripgreprg · grep replacement, the agent's search engineReplaces grep · search code by contentSearches text across the whole codebase, 10×+ faster, auto-skips node_modules and gitignore'd files. Example: rg "getUserInfo" finds where a function is called. It's the underlying code-search engine for agents like Claude Code.
fdfind replacement, friendlier syntaxReplaces find · locate files by nameHuman-readable syntax: fd config, versus the old find . -name "*config*". Respects gitignore by default — never digs into node_modules.
batcat with highlighting, auto-pagingReplaces cat · read filesViews files with syntax highlighting, line numbers and git change markers — a qualitative leap for reading code in the terminal.
ezals replacement, icons + treeReplaces ls · list directoriesColorful listings with icons; lt shows a tree — one command to grasp an unfamiliar project's structure.
fzffuzzy finder, the Ctrl+R history wizardFuzzy FinderCtrl+R searches command history: only remember that a command from three days ago contained "docker"? Type a few letters and it's back. Also plugs into pipes to search files, processes and git branches.
zoxidesmarter cd, learns as you goA cd that learnsRemembers the directories you visit; later z proj jumps straight to your most-frequented match — no full paths. Gets sharper the longer you use it.
jq / yqJSON / YAML processing duoStructured Data ExtractorsAn API returns a blob of JSON; jq '.data[0].name' pulls out just the field you want; yq does the same for YAML. Daily drivers when working with agents' structured output.
httpiefriendlier curl for API debuggingReplaces curl · debug APIshttp POST api.x.com name=Tom — automatic JSON, highlighting and formatting; no memorizing curl flags.
hyperfinecommand benchmarkingCommand Stopwatchhyperfine 'option A' 'option B' runs each command multiple times and reports average timings — "which one is faster" now has data behind it.
bottombtm · htop replacementSystem MonitorCPU / memory / network / processes on one screen, with graphs. Open it to watch the load while agents run long tasks at full throttle.
dust / dufdu / df in modern formDisk Space Visualizationdust answers "which directory eats the most space", duf answers "how is each disk used" — both with intuitive bar charts.
sdsed replacement, regex as intuitionReplaces sed · find & replacesd "old text" "new text" file — the syntax is pure intuition; no sed escaping or -i flags to remember.
tlrctldr command cheat sheetCommand Cheat Sheetstldr tar shows the 5 most common examples — a hundred times friendlier than man pages. Ask it first when you forget a command.
07
Editor

Editors & IDEsvscode · zed

Terminal agents do the heavy lifting; the editor is only for reviewing diffs and fine adjustments. Strategy: VS Code as the mainstay (keeps your existing habits, richest ecosystem) + ZedZed · Zed IndustriesBuilt by the original team behind GitHub's Atom editor (they also created the Tree-sitter parsing engine). After Atom was sunset they rewrote it from scratch in Rust: GPU-accelerated, millisecond startup, native multiplayer collaboration, open-sourced in 2024, with a built-in AI panel. as the lightweight alternative (opens huge files in a blink). No Cursor: your AI horsepower already lives in terminal agents; stacking another AI subscription on the editor duplicates value.

zsh — editors
brew install --cask visual-studio-code    # mainstay: richest ecosystem
brew install --cask zed                   # alternative: instant startup, built-in AI panel
08
Core · The Fleet

AI Agent Stackmulti-agent

The 2026 consensus: don't bet on a single agent. The core lineup is a set of seven — Claude Code for long tasks, Codex for PR delivery, DSH for plugin orchestration, PI for self-extension, WorkBuddy and ZCode for full-scenario desktop work.

Main Force · Strongest

Claude Code

curl -fsSL https://claude.ai/install.sh | bash

The strongest all-rounder: repo comprehension, sub-agents, git worktree parallelism, hours-long unattended tasks.

Open Source · MIT

Kimi Code CLI

curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

Moonshot's terminal agent. Built-in coder / explore / plan sub-agents, conversational MCP setup via /mcp-config, great value. Also installable via npm.

Delivery · PR

Codex CLI

npm install -g @openai/codex

OpenAI's open-source terminal agent; tasks come back as Pull Requests. Included with ChatGPT subscriptions.

Plugin-based · Orchestration

DSH · DeepSeek Harness

npx -y @deepseek-ai/dsh

DeepSeek's plugin-based agent runtime: models, tools, sub-agents — everything is a plugin; bridge plugins can turn Codex / Kimi into its "second opinion".

Self-Extending

PI · Agent Harness

npm install -g @earendil-works/pi-coding-agent

MIT-licensed open-source coding agent; pi-ai unifies multiple LLM APIs. Note: no built-in permission system — containerize it for sensitive projects.

Desktop · All Scenarios

WorkBuddy · Tencent

Download the desktop app from the official site

A desktop AI agent workstation: Coding Mode for code, Work Mode for office tasks; supports local model configs connecting DeepSeek and other models.

China-made · Desktop ADE

ZCode · Zhipu

Download the macOS build at zcode.z.ai/cn

Zhipu's desktop agent development environment: Goal long-horizon tasks, remote invocation via WeChat/Feishu/Telegram, deep GLM-5.3 integration, plus visual management of other CLI agents. On first launch choose "Connect BigModel" (GLM Coding Plan) — one subscription also powers 20+ tools like Claude Code, which pairs perfectly with cc-switch.

Write an AGENTS.md for every projectBuild commands, code conventions, directory layout, forbidden zones. An agent's performance ceiling = the quality of context you give it. Claude Code also reads CLAUDE.md.
Configure permissions and hooksDeclare permission modes and dangerous-command interception in each agent's config (~/.claude/settings.json, kimi's config.toml), so you're not confirming every step and agents can't overstep.
Centralize API key managementKeys never go into project files, plaintext dotfiles, or shell history — see Chapter 11.
Companion: cc-switch — the provider master switch for Claude Code / Codex. An open-source desktop app (Tauri + Rust) that turns each API provider's base URL, key and model (official / DeepSeek / GLM / third-party gateways) into graphical presets with one-click switching — no hand-editing settings.json; the new version also integrates MCP / Skills management. Install: brew tap farion1231/ccswitch && brew install --cask cc-switch; if you hit a macOS version compatibility error (a known issue), grab the DMG from GitHub Releases instead.
zsh — multi-agent parallel workflow
# Use git worktree for isolated workspaces — parallel agents without conflicts
git worktree add ../proj-feat-a feat-a
git worktree add ../proj-feat-b feat-b

# Window 1:  cd ../proj-feat-a && claude
# Window 2:  cd ../proj-feat-b && kimi
Runtime: herdrherdr · Agent RuntimeA background server that holds real terminal sessions for coding agents — agents keep running through lid close, network drops and reboots, and you reattach from any device. It reads every pane and marks each agent working / blocked / idle; its CLI + socket API are one surface, so agents can split panes and start / prompt / wait on each other. Detects 21 agent CLIs out of the box; single binary for macOS / Linux / Windows. Young YC-backed project: stay on the stable channel, prefer brew-managed installs. — where the agent fleet lives. The seven agents above run inside herdr instead of loose terminal windows: the agent-native successor to tmux, the runtime layer the fleet lives on.
zsh — herdr agent runtime
brew install herdr                            # preferred: updates ride along with brew upgrade
mise use -g herdr                             # alternative (old mise: mise use -g github:herdrdev/herdr)
curl -fsSL https://herdr.dev/install.sh | sh  # direct installer; only these use herdr update
09
Extension

MCP: Giving Agents "Hands"model context protocol

MCPMCP · Model Context ProtocolThe "standardized socket" between agents and external tools — think USB-C: an agent implements the client once, a tool implements the server once, and they plug together. Servers expose tools (callable functions, 99% of use cases) / resources (data) / prompts (templates); local servers run as the agent's subprocess, remote ones over HTTP. lets agents plug into external tools. Each agent configures it differently (Claude Code uses claude mcp add, Kimi Code uses /mcp-config). Only install what the current project actually uses — more MCPs mean a more bloated context.

Playwright MCPBrowser automation; agents verify frontend pages themselves
Context7Pulls up-to-date library docs on demand, eliminating stale-API hallucinations
GitHub MCPIssue / PR / code search operations
Figma MCPDesign files straight to code
Managing MCP across multiple agents: the new version (v3.x) of cc-switch you're already using has centralized MCP management built in — configure once, sync everywhere, and it handles Skills too; a dedicated CLI alternative is mcpmmcpm · MCP Package ManagerManages MCP servers the way Homebrew manages software: search and install from a central registry, group and toggle with profiles, sync across clients, and aggregate multiple servers behind one router endpoint. Limited native support for Claude Code — manual wiring required. Install: brew install mcpm. Note: these tools are essentially a "maintain once, sync everywhere" translation layer — the agents' MCP config formats aren't fully unified yet.
10
Runtime Sandbox

Containers & Local Servicesorbstack

OrbStackOrbStack · Danny Lin (kdrag0n)The work of an indie developer's one-person company, released in 2023. The author was previously a well-known Android custom-kernel developer (creator of Proton Kernel) and rewrote the entire Docker + Linux virtualization stack natively in Swift / Rust — "one person beat Docker's official product". Free for personal use, paid for commercial use. replaces Docker Desktop: the fastest, most power-efficient Docker / Linux runtime on macOS. All databases run containerized — nothing pollutes the system.

zsh — containers
brew install --cask orbstack
brew install lazydocker   # container TUI: lazygit for Docker

docker run -d --name pg -p 5432:5432 \
  -e POSTGRES_PASSWORD=dev postgres:17
docker run -d --name redis -p 6379:6379 redis:7
11
Security

Secrets & Security Management1password · direnv

In the AI era you hold more API keys than credit cards. Iron rules: keys never enter git, never enter dotfiles in plaintext, never enter ~/.zshrc in plaintext. Take the free path first; 1Password1Password · Paid SubscriptionAbout $3/month (billed annually) for the personal plan; no free tier, just a 14-day trial. Unique value: op run injects API keys at runtime, plus a cross-device experience. Free alternatives are good enough — macOS Keychain for SSH keys, Bitwarden (free tier, with CLI and SSH agent) for passwords. is an optional paid extra (subscription ≈ $3/month).

zsh — secrets (free path)
brew install direnv age sops     # auto-load .env + encrypt sensitive configs

# SSH private keys managed by the native macOS Keychain (free, built-in)
ssh-keygen -t ed25519
ssh-add --apple-use-keychain ~/.ssh/id_ed25519

# Optional paid: brew install --cask 1password 1password-cli
# Inject keys across projects: op run --env-file=.env.tpl -- claude
SSH Key free option: macOS Keychain1Password + Keychain WorkflowA layered division of labor: Keychain handles "what the system itself needs" (SSH passphrase unlocked once at boot, invisible all day), 1Password handles "what you and your agents need" (website passwords, API keys). When running agents, keep only a .env.tpl reference template in the project; op run injects at runtime with one Touch ID authorization — keys never land on disk. Discipline: enable only one of the two SSH agents; stick with Keychain. management (command above); paid option: 1Password SSH Agent, where the private key never touches disk. Free password-manager alternative: Bitwarden.
12
Productivity

macOS Productivity Appsraycast & friends

zsh — productivity casks
brew install --cask raycast rectangle alt-tab stats karabiner-elements
RaycastThe launcher king: clipboard history / window management / quicklinks all included · free tier is enough
RectangleOpen-source window snapping shortcuts · free
AltTabWindows-style window switching · free & open source
StatsMenu-bar load monitor; watch CPU/memory while agents run · free & open source
KarabinerKeyboard remapping: CapsLock → Esc/Ctrl · free & open source
Pricing: Rectangle / AltTab / Stats / Karabiner are all free and open source; Raycast's free tier already covers the core features — Pro (≈ $8/month) mainly buys AI and cloud sync, and your AI needs already live in terminal agents, so the free tier is enough.

Second tier (daily enhancements — a macOS mapping of the OmarchyOmarchy · DHH's Fully-Loaded LinuxAn Arch distribution led by DHH (creator of Ruby on Rails), preloaded with a curated set of dev/productivity tools; very popular in 2025. This tier maps its list to macOS; items like fzf / ripgrep / lazygit / Neovim are already covered by this guide. list):

zsh — daily essentials
brew install --cask google-chrome obsidian shottr localsend iina tailscale
ChromeBrowser · frontend debugging baseline · free
ObsidianMarkdown notes · freeThe Knowledge Base for the Agent EraNotes stored as plain .md files — your knowledge base can be read and organized by agents directly. That's the dividing line between note software for the AI era and ordinary documents.
ShottrScreenshot annotation · scrolling capture / redaction / measuring · free
LocalSendCross-platform AirDrop · free & open sourceWindows ↔ Mac TransfersDrag files directly between machines on the same LAN — no commands, no cables. The easiest path for small files in the Chapter 15 migration.
IINAVideo player · the best native macOS player · free & open source
TailscaleMesh VPN · free for personal useThe Perfect Match for an Always-On MacOnce set up, you can securely SSH back into this Mac from the office or on the road, taking over agent tasks running on it anytime.
Pick as needed: LibreOffice (office suite), Typora (Markdown writing, $15 one-time), Spotify, Dropbox.
13
Infrastructure as Code

Automation: Restore the Entire Environment with One Commandbrewfile · chezmoi

This is the soul of the whole setup: software list, configs and runtimes — all as code, stored in a private git repo. For the first setup, follow chapters 1–12 in order, then do this chapter once at the end; the payoff comes with your next machine — run a single bootstrap and you're restored in 30 minutes. Manage dotfiles with chezmoichezmoi · Dotfiles ManagerFree and open source (written in Go, released by Tom Payne in 2019), the most mainstream tool in its category. Collects scattered dotfiles into a git repo and restores them on a new machine with one command; its strengths are templating (per-machine differences) and encryption (sensitive configs age-encrypted into the repo)..

zsh — snapshot & restore
# After installing everything, export the list
brew bundle dump --file=~/dotfiles/Brewfile --force

# Manage dotfiles with chezmoi (supports templates & encryption)
brew install chezmoi
chezmoi init --apply <your-dotfiles-repo>
bootstrap.sh — new-machine entry point
#!/bin/bash
# The only script a new Mac needs to run
xcode-select --install 2>/dev/null
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
brew bundle --file=<your-Brewfile>
chezmoi init --apply <your-dotfiles-repo>
mise install
gh auth login
14
Verify

Acceptance Checklistfinal check

zsh — acceptance
brew doctor && echo OK
git --version && gh auth status
mise ls                        # node / python / go in place
uv --version && node -v && python3 -V
claude --version; kimi --version; codex --version; pi --version
npx -y @deepseek-ai/dsh --version   # DSH
# Desktop: complete model sign-in on first launch of ZCode / WorkBuddy
docker run hello-world         # OrbStack
rg --version && fzf --version
ssh -T git@github.com          # SSH auth
Once everything passes, run brew bundle dump and commit your dotfiles — your environment is now reproducible, portable, and evolvable.
15
Appendix · Migration

Appendix: Migrating from Windows to Macworkspace → mac

The one-line principle: code travels via git, configs are rebuilt, dependency directories are never migrated.

Project files: git firstPush everything pushable to GitHub and clone on the Mac — history, branches and remotes all come along. Anything not in git goes via scp / LocalSend / an exFAT drive (LocalSend is easiest for small files, see Chapter 12). Never migrate node_modules / .venv / target / __pycache__: x86 and arm64 binaries are incompatible — rebuild them on the Mac with mise / uv / pnpm in a minute; migrate only source + .git.
Config files: rebuild mostly, carry a fewVS Code Settings Sync (GitHub account) syncs automatically; agent configs (~/.claude, config.toml) can be copied directly — just fix the Windows path fields; regenerate SSH keys on the Mac, and take the chance to enroll API keys into 1Password / Keychain.
Overlap period: Syncthing + git disciplineIf you need live directory sync, use SyncthingSyncthing · Peer-to-Peer SyncFree, open-source, direct device-to-device sync with no cloud middleman. Two-way sync for the Workspace directory; be sure to add ignore rules excluding dependency directories like node_modules. (free, open source, peer-to-peer) for two-way Workspace sync; build the habit of "push before switching machines". End state: Mac primary, Windows backup, git at the center — no long-term two-way sync needed.
Windows Git Bash → Mac (enable "Remote Login" on the Mac first)
# Run in Git Bash on Windows to push projects to the Mac
scp -r /c/Users/TUF/Workspace/<project> user@<mac-ip>:~/Workspace/

# Big-file fallback: an exFAT external drive (native read/write on both sides)
# Or enable SMB "File Sharing" on the Mac → drag & drop from Windows via \\<mac-ip>
16
Day-2 Operations

Day-2 Operations: Install, Remove, Change, Updatedotsync

Core mental model: two layers of assets, each with one discipline — the software layer answers to the Brewfile, the config layer answers to chezmoi. You don't run chezmoi for every step: a single dotsync alias bundles all the wrap-up actions.

Software layer: install / remove / updateAfter brew install / uninstall / upgrade, the wrap-up is always the same: re-export the Brewfile. The list records no version numbers — one dump after upgrading is enough. Runtimes belong to mise (mise upgrade); agent CLIs upgrade themselves (kimi upgrade, etc.).
Config layer: touch chezmoi only when dotfiles changeEdit the source file directly (e.g. ~/.zshrc), then chezmoi re-add to pull it into the repo; use chezmoi add for newly managed files. Everything else in daily life never touches chezmoi.
dotsync: one command to wrap upRun it once after installing / removing / changing anything: export the list + collect configs + commit and push. Forgetting it breaks nothing — the next machine just misses a few changes. Tip: use ~/dotfiles as the chezmoi source dir and keep the Brewfile inside it too.
~/.zshrc — dotsync wrap-up function
dotsync() {
  brew bundle dump --file=~/dotfiles/Brewfile --force  # software list
  chezmoi re-add                                       # collect config changes
  git -C ~/dotfiles add -A
  git -C ~/dotfiles commit -m "chore: sync $(date +%F)"
  git -C ~/dotfiles push
}
Suggested rhythm: dotsync casually; weekly or monthly brew update && brew upgrade && brew cleanup and mise upgrade; the lazy option — write the maintenance routine as a prompt for an agent to run regularly, or schedule brew upgrade with launchd.
Crafted for the agentic era.
MAC × AI AGENT · SETUP FIELD MANUAL · 2026