How to export Text replacements from the Keyboard System Preference from shell?

There is an unofficial command line tool, which does exactly what you want, its called shortcuts. As mentioned on GitHub, you can install it via homebrew

brew install rodionovd/taps/shortcuts

and then list your current replacements via

shortcuts read

and add new ones via

shortcuts import <input.plist>
shortcuts create <shortcut> <new phrase>
shortcuts update <shortcut> <phrase>
shortcuts delete <shortcut>

for details, see the documentation.


simply cmd+a on teh text replaceent files, drag them to desktop, send that file in email, drag and drop it back to the text replacement in the settings on teh new MacBook, done