docs/bootstrap/macos-defaults.md
mise can declare macOS user defaults (preferences) in the
[bootstrap.macos.defaults] section of mise.toml and apply them with
mise bootstrap macos-defaults apply:
[bootstrap.macos.defaults]
NSGlobalDomain = { KeyRepeat = 2, InitialKeyRepeat = 15, ApplePressAndHoldEnabled = false }
"com.apple.dock" = { autohide = true, tilesize = 48, orientation = "left" }
"com.apple.finder" = { ShowPathbar = true, AppleShowAllFiles = true }
Each key under [bootstrap.macos.defaults] is a preferences domain. Quote
domains containing dots. Values map to the matching defaults write type:
| TOML value | written as | example |
|---|---|---|
| boolean | -bool true/false | autohide = true |
| integer | -int <n> | tilesize = 48 |
| float | -float <n> | scale = 1.5 |
| string | -string <s> | orientation = "left" |
Other plist shapes (arrays, dicts, dates, data) are not supported; entries using them parse fine but are skipped with a warning, so configs written for newer mise versions still work.
[bootstrap.macos.defaults] follows the same rules as
[bootstrap.packages]:
mise bootstrap macos-defaults status and mise doctor list the entries
as skipped (so nothing is silently invisible) and
mise bootstrap macos-defaults apply ignores them, so a shared config
authored for both Linux and macOS just works.mise bootstrap macos-defaults apply does, after the usual confirmation
prompt.1 does not satisfy a
configured true. mise bootstrap macos-defaults apply converges it to the
typed value.User defaults are per-user, so unlike system packages no sudo is ever
involved. Host-scoped preferences (defaults -currentHost) and sudo defaults system domains are not supported.
mise bootstrap macos-defaults status # shows defaults drift
mise bootstrap macos-defaults status --missing # exit 1 if anything is unset or differs
mise bootstrap macos-defaults apply # writes unset/differing defaults
mise bootstrap macos-defaults apply --dry-run # print the `defaults write` commands
mise bootstrap macos-defaults apply --yes # skip the confirmation prompt
mise bootstrap macos-defaults status reports each entry as set (matches),
differs (a value exists but doesn't match — the current value is shown), or
unset. mise doctor summarizes the same drift.
Some applications only pick up changed defaults after a relaunch — mise prints a reminder after writing. The usual suspects:
killall Dock
killall Finder
killall SystemUIServer
mise deliberately does not kill applications itself.
To discover a setting's domain and key, change it in System Settings and
diff the output of defaults read before and after, or read a domain
directly:
defaults read com.apple.dock
defaults read-type com.apple.dock tilesize