Workflow Examples
Practical workflows for common macprefs use cases.
Export and Apply (Free Tier)
Section titled “Export and Apply (Free Tier)”Basic workflow for personal preference management:
# Export current Apple preferencesmacprefs export my-prefs.json
# Review what would changemacprefs plan --config my-prefs.json
# Apply with interactive confirmationmacprefs apply --config my-prefs.jsonCI/CD Workflow (Pro+ Required)
Section titled “CI/CD Workflow (Pro+ Required)”Headless automation for CI/CD pipelines:
# Headless apply for automationmacprefs apply --config my-prefs.json --yes
# JSON output for parsingmacprefs plan --config my-prefs.json --format jsonNew Machine Setup
Section titled “New Machine Setup”Setting up a fresh Mac with your preferences:
# 1. Run preflight to verify systemmacprefs preflight
# 2. Review what will be appliedmacprefs plan --config my-prefs.json --verbose
# 3. Apply preferencesmacprefs apply --config my-prefs.json
# 4. Restart affected applicationskillall Dock FinderRolling Back Changes
Section titled “Rolling Back Changes”If something goes wrong:
# Free tier - rollback to last runmacprefs rollback
# Pro+ - rollback to specific runmacprefs rollback --run-id 2026-01-04T10-30-00Snapshots are stored in ~/Library/Application Support/macprefs/runs/.
Validating Config Files
Section titled “Validating Config Files”Check config syntax before applying:
# Validate JSON structure and required fieldsmacprefs validate --config my-prefs.jsonExploring Domains
Section titled “Exploring Domains”Discover available domains and keys:
# List all available domainsmacprefs list
# List keys in a specific domainmacprefs list --domain com.apple.dock
# Inspect current valuesmacprefs inspect --domains com.apple.dock --keys autohide,tilesizeComparing Current vs Desired State
Section titled “Comparing Current vs Desired State”Use plan with verbose mode to see all changes:
# Summary only (default)macprefs plan --config my-prefs.json
# Full detailsmacprefs plan --config my-prefs.json --verbose
# Filter by type (Pro+)macprefs plan --config my-prefs.json --filter conflictsThird-Party Apps (Pro+)
Section titled “Third-Party Apps (Pro+)”Managing third-party application preferences:
{ "version": "1.0", "os": "26", "domains": { "com.apple.dock": { "autohide": true }, "com.googlecode.iterm2": { "PromptOnQuit": false, "OnlyWhenMoreTabs": true }, "com.microsoft.VSCode": { "ApplePressAndHoldEnabled": false } }}Dark Mode Setup
Section titled “Dark Mode Setup”Configure system-wide dark mode:
{ "version": "1.0", "domains": { "NSGlobalDomain": { "AppleInterfaceStyle": "Dark" } }}Multiple Domains Example
Section titled “Multiple Domains Example”A complete setup with multiple system domains:
{ "version": "1.0", "os": "26", "domains": { "com.apple.dock": { "autohide": true, "orientation": "left", "show-process-indicators": false, "show-recents": false, "tilesize": 48, "magnification": true, "largesize": 96 }, "com.apple.finder": { "AppleShowAllExtensions": true, "ShowPathbar": true, "FXEnableExtensionChangeWarning": false, "FXPreferredViewStyle": "Nlsv" }, "NSGlobalDomain": { "AppleKeyboardUIMode": 3, "com.apple.keyboard.fnState": true, "AppleInterfaceStyle": "Dark" } }}