Read a preference value: defaults read com.apple.finder ShowPathbar
Write a boolean preference: defaults write com.apple.finder ShowPathbar -bool true
Write an integer: defaults write com.example.myapp LaunchCount -int 5
Delete a specific key: defaults delete com.example.myapp LaunchCount
Read all keys for a domain: defaults read com.example.myapp — output is a plist dictionary.
Known gotchas
Many macOS preferences are cached by the cfprefsd daemon; changes may not take effect in a running application until it re-reads its preferences or is restarted.
The domain argument is typically a reverse-DNS bundle identifier (e.g., com.apple.finder), but you can also pass an absolute path to a .plist file.
Type flags (-bool, -int, -float, -string, -array, -dict, -data) are required when writing; omitting them causes the value to be stored as a string regardless of content.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp