Skip to content

@tank/macos-configurator

1.0.0

macOS system configuration via CLI. Covers defaults write, networksetup, pmset, systemsetup, scutil, hidutil, and PlistBuddy for keyboard, trackpad, Dock, Finder, network (DNS, proxy, Wi-Fi), power, display, sound, security, and per-app settings. Generates idempotent setup scripts. Companion to @tank/macos-cleanup and @tank/macos-maintenance. Triggers: configure mac, mac setup, macos defaults, key repeat, dock settings, change dns, dark mode, hot corners, caps lock remap, dotfiles.


name: "@tank/macos-configurator" description: | macOS system configuration via command line. Covers the full defaults write, networksetup, pmset, systemsetup, scutil, hidutil, and PlistBuddy universe for configuring keyboard, trackpad, Dock, Finder, screenshots, network (DNS, proxy, Wi-Fi, hostname), power management, display, sound, security/privacy, and per-app settings. Generates idempotent setup scripts and reads current configuration. Companion to @tank/macos-cleanup (space recovery) and @tank/macos-maintenance (system health) — this skill CONFIGURES preferences, not cleans or diagnoses. Synthesizes mathiasbynens/dotfiles, macos-defaults.com, Apple man pages, macOS Security Compliance Project (NIST), and Scripting OS X.

Trigger phrases: "defaults write", "configure mac", "mac setup", "new mac setup", "macos defaults", "mac preferences", "system preferences", "system settings", "key repeat", "trackpad settings", "dock settings", "finder preferences", "change dns", "set proxy", "dark mode", "hot corners", "screenshot settings", "modifier keys", "caps lock remap", "remap caps lock", "power settings", "sleep timer", "configure keyboard", "mac configuration", "setup script", "dotfiles", "configure trackpad", "natural scrolling", "tap to click", "auto-correct off", "smart quotes", "hide dock", "dock position", "show hidden files", "file extensions", "hostname", "computer name", "accent color", "menu bar clock", "configure firewall", "startup chime", "login window"

macOS Configurator

Configure macOS system preferences via command line. Covers every major preference domain — keyboard, trackpad, Dock, Finder, network, power, display, sound, security, and per-app settings.

Core Philosophy

  1. Read before writing. Check the current value with defaults read before changing anything. Show the user what will change.
  2. Explain side effects. Many changes need killall Dock, logout, or restart to take effect. State the requirement with every command.
  3. Prefer built-in tools. Use defaults, networksetup, pmset, systemsetup, scutil — not raw plist editing — unless nesting requires PlistBuddy.
  4. Script-friendly. When users ask to configure multiple settings, generate a single idempotent shell script they can save and reuse.
  5. Know the boundaries. Some settings can't be changed via CLI due to SIP or TCC restrictions. Say so instead of guessing.

Quick-Start

"Make key repeat faster"

defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15

Requires logout/login. See references/keyboard-trackpad-input.md.

"Change my DNS to Cloudflare"

sudo networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder

See references/network-hostname.md.

"Set up a new Mac for development"

  1. Run bash scripts/read-config.sh to capture current state
  2. Apply settings from references/app-settings-recipes.md (Developer Setup recipe)
  3. Verify with defaults read on changed domains

"Generate a setup script from my current config"

bash scripts/read-config.sh --json > ~/my-mac-config.json

Then use the output to build an idempotent setup script. See references/app-settings-recipes.md for script patterns.

CLI Tool Selection

TaskToolSudo?
App/system preferencesdefaultsNo (usually)
Nested plist valuesPlistBuddyNo
Network (DNS, proxy, Wi-Fi)networksetupYes for writes
HostnamescutilYes
Power/sleep/hibernatepmsetYes
Time zone, remote loginsystemsetupYes
Modifier key remappinghidutilNo
Services/daemonslaunchctlVaries

See references/defaults-and-tools.md for full tool reference.

Decision Trees

What to Configure Based on User Request

User SaysDomainReference File
Key repeat, auto-correct, caps lock, trackpadInputkeyboard-trackpad-input.md
Dock, Finder, screenshots, hot corners, SpotlightDesktopdock-finder-desktop.md
DNS, proxy, Wi-Fi, hostname, firewallNetworknetwork-hostname.md
Sleep, display, dark mode, sound, login windowPower/Displaypower-display-sound.md
Screen lock, Gatekeeper, FileVault, updatesSecuritysecurity-privacy.md
Safari, Mail, Terminal, TextEdit, setup scriptsApps/Recipesapp-settings-recipes.md
How does defaults work? Tool referenceToolsdefaults-and-tools.md

Applying Changes

Domain ChangedRestart Command
com.apple.dockkillall Dock
com.apple.finderkillall Finder
com.apple.screencapturekillall SystemUIServer
Menu bar itemskillall SystemUIServer
NSGlobalDomain keyboardLogout/login required
com.apple.SafariRestart Safari
Stubborn preferenceskillall cfprefsd (nuclear option)

Companion Skills

SkillFocusWhen to Use
@tank/macos-cleanupDisk space recovery"Free up space", "clean caches"
@tank/macos-maintenanceSystem health"Is my Mac OK?", "security audit"
@tank/macos-configuratorSystem preferences"Change settings", "configure Mac"

Reference Files

FileContents
references/defaults-and-tools.mdCore CLI tools (defaults, PlistBuddy, systemsetup, scutil, launchctl, hidutil), domain discovery, applying changes, gotchas and version differences
references/keyboard-trackpad-input.mdKey repeat, text corrections, function keys, modifier remapping (hidutil), trackpad gestures, mouse, input sources, language/locale
references/dock-finder-desktop.mdDock (size, autohide, position, hot corners), Finder (extensions, hidden files, views), screenshots, Mission Control, Spotlight, menu bar, desktop icons
references/network-hostname.mdDNS (with provider table), proxy, Wi-Fi, IP config, hostname (3 name types), firewall (socketfilterfw), VPN, AirDrop, network time
references/power-display-sound.mdpmset (sleep, hibernate, wake, caffeinate), display (dark mode, accent color, font smoothing), sound (startup chime, UI sounds), login window
references/security-privacy.mdScreen lock, Gatekeeper, FileVault, firewall rules, remote access, quarantine, auto-updates, Handoff, TCC limitations
references/app-settings-recipes.mdPer-app settings (Safari, Mail, Terminal, TextEdit, etc.), setup script patterns, backup/restore, common recipes (developer, designer, minimal)

Scripts

ScriptUsage
scripts/read-config.shReads current macOS configuration across major domains. Flags: --json (JSON output), --domain <name> (single domain), --diff <file> (compare to saved config)

Command Palette

Search skills, docs, and navigate Tank