Alfred allows you to save your frequently used text clips as Snippets. Over the past few years I’ve created hundreds of them.
There’s one problem. Alfred snippets only work on your Mac. Today we’ll focus on how we can convert them into macOS snippets. That way, you’ll be able to use them across all your Apple devices!
How
Alfred stores snippets as a Zip archive. On macOS, you can open it with the Archive Utility app that’s shipped with the system. After successfully exporting it, you’ll need to convert it from Alfred’s data format to the one used by the system snippets. macOS allows to import keyboard snippets in bulk with Property List format files (plist
).
Here’s how Alfred stores snippets:
{
"alfredsnippet" : {
"snippet" : "🐛",
"uid" : "81F59CDA-FD1E-4D71-AB4C-E4C47212023B",
"name" : "bug",
"keyword" : "bug"
}
}
… and here’s how macOS stores snippets:
<dict>
<key>phrase</key>
<string>🐛</string>
<key>shortcut</key>
<string>:bug</string>
</dict>
Steps
- Export a snippet collection from Alfred
- Alfred -> Features -> Snippets -> Collection -> right-click -> Export
macOS does not allow us to group snippets into collections
- Open the exported file using the Archive Utility app
- right-click -> Open With -> Archive Utility
- Convert files from Alfred’s format (
json
) to macOS format (plist
)
For this step I use a script written in Swif. You can download it here: bkunat/snippet-converter. Should you decide to use it, please follow instructions in the
main.swift
file.
- Import the snippets into
/System/Library/PreferencePanes/Keyboard.prefPane
- System Settings -> Keyboard -> Text Replacements -> drag&drop the created
plist
file
Notes
- All devices need to be signed into a single iCloud account. Otherwise, macOS won’t sync your snippets.
- macOS 13.2
- Alfred 5.0.6