Skip to content

Configuration Format

Complete reference for the macprefs configuration file format.

{
"version": "1.0",
"os": "26",
"domains": {
"com.apple.dock": {
"key": "value"
}
}
}

Every config file must have:

FieldDescription
versionConfig schema version (currently "1.0")
domainsMap of domain names to key-value pairs
FieldDescription
osTarget macOS version (informational, e.g., "26" for Tahoe)

Domains are the top-level identifiers for preference groups:

  • com.apple.dock — Dock preferences
  • com.apple.finder — Finder preferences
  • NSGlobalDomain — Global system preferences
  • com.googlecode.iterm2 — Third-party app (Pro+ only)

Direct "key": value with type inferred from JSON:

{
"version": "1.0",
"domains": {
"com.apple.dock": {
"autohide": true,
"tilesize": 48,
"orientation": "left"
}
}
}

Use extended form for compare hints and notes:

{
"version": "1.0",
"domains": {
"com.apple.finder": {
"FavoriteItems": {
"value": ["Applications", "Documents", "Downloads"],
"compare": "unordered",
"note": "Sidebar items - order doesn't matter"
}
}
}
}

Extended form fields:

  • value — The actual preference value
  • compare — Compare mode: "default", "strict", or "unordered"
  • note — Optional documentation comment
  • enforceDomain — Reset missing keys (planned for v1.1, not yet implemented)
ModeDescription
default / strictExact equality including array order
unorderedArrays/dicts compared by content, ignoring order
JSON TypemacOS TypeExample
StringCFString"value"
IntegerCFNumber42
FloatCFNumber3.14
BooleanCFBoolean → Integertrue1
ArrayCFArray["a", "b"]
ObjectCFDictionary{"k": "v"}

Full Unicode, emojis, and escape sequences are supported:

{
"version": "1.0",
"domains": {
"com.apple.TextEdit": {
"author": "日本語テスト",
"emoji-test": "🎉🚀💻",
"path-with-spaces": "/Users/test/My Documents/file.txt"
}
}
}
  • Managed-subset apply: Only listed keys are compared/applied; unlisted keys are ignored
  • Large configs: 100+ domains handled efficiently (~73ms per domain write)
  • Concurrent access: Last-writer-wins for conflicting writes; no file locking