Mac OS X: edit .plist files from CLI

A number of methods are available that involve “tools” either requiring installatins or some form of previous knowledge about the .plist file contents.
As everything we need is already embedded within the OS (tested with 10.8.5), I’ll just go ahead and describe my manual method:

  1. convert the .plist file (or a copy!) from binary1 (default/original format) to the format of your preference (xml1 or json)
  2. plutil -convert xml1 <filename>
  3. edit the file
  4. vi <filename> :)
  5. convert the file back to binary1 format
  6. plutil -convert binary1 <filename>

Leave a comment