Migration
Already using another text expander? You don't have to retype your snippets. snippety-migrate is a command line tool that converts an export from your current app into a Snippety backup file, which you then import in Snippety.
Snippets, keywords, names, descriptions, tags, collections, formatting, and - as far as the two apps agree - placeholders all carry over. Anything that has no equivalent in Snippety is left in the snippet as plain text and reported as a warning, so you can see exactly what needs a manual touch instead of discovering it later.
The migrator is experimental. Every supported app is a separate format with its own quirks, and some of them are barely documented, so a snippet may end up converted incorrectly - or an export may fail to be read at all. Review the warnings, and check your snippets after the import. If something comes out wrong, please report it with a sample.
Supported Apps
| App | Export |
|---|---|
| TextExpander | .csv |
| TextExpander Backup | .textexpbackup |
| aText | .atext, or the uncompressed .json |
| Raycast | .json |
| Rocket Typist | .csv (tab separated) |
| espanso | .yml match files - a single one, or the whole match directory |
| Alfred | .alfredsnippets - one file, or a directory of them |
Missing your app? Open an issue in the snippety-migrate repository. Adding a new source app is a single file, so a sample export is usually all it takes.
Any Other App
Most text expanders can export to CSV, and Snippety imports CSV files on its own - no extra tool needed. If your app is not on the list, export its snippets to CSV, arrange the columns as keyword, title, and content, and import the file as described in CSV File.
This carries the keyword, name, and text of every snippet. Placeholders, collections, tags, and formatting are not part of a CSV, so those are the parts you would set up again in Snippety.
Installation
With Homebrew:
brew install snippety-app/tap/snippety-migrate
Or download snippety-migrate-<version>.pkg from the
releases and open
it - it installs the tool into /usr/local/bin. The package is signed and
notarized, so it opens without any Gatekeeper warnings. Universal binary, macOS
13 or later.
Nothing is installed into Snippety itself - the tool only reads your export and writes a JSON file, so you can remove it once the migration is done.
Converting Your Snippets
Run it without arguments and it asks the questions itself:
snippety-migrate
Snippety migration guide
Press Enter to accept the value in [brackets], Ctrl-C to quit.
Which app are you migrating from?
1) TextExpander CSV export from TextExpander
2) TextExpander Backup Backup file from TextExpander (.textexpbackup)
3) aText Export from aText, compressed .atext or plain .json
4) Raycast JSON export from Raycast
5) Rocket Typist Tab separated export from Rocket Typist
6) espanso YAML match files from espanso — one file or a whole `match` directory
7) Alfred Snippet collections from Alfred, one file or a directory of them
› 1
Where is the file you exported from TextExpander?
Drag it into the terminal, or type the path.
› ~/Downloads/My-Snippets.csv
The remaining questions - where to write the backup, which collection to use,
whether to strip a keyword prefix, tags, how to treat formatted snippets, and
the language for date placeholders - all come with a default in [brackets]
that Enter accepts. Only the questions that matter for the app you picked
are asked.
It finishes with a summary, the number of migrated snippets, any warnings, and the command that would have done the same thing without the questions:
TextExpander: migrated 7 snippet(s)
2 warning(s):
! [Signature] Date maths of +2m is not followed by a date token, so it produces
nothing — same as in TextExpander. Add a date token after it to shift a date.
! [All Placeholders] Optional section 'optinal selection' has no Snippety
equivalent — its content was kept and the section markers dropped.
Wrote /Users/me/Downloads/My-Snippets-snippety.json
Done. Import it with Snippety → Preferences → Backup → Import.
Without The Questions
Every answer is also a flag:
# The file name is enough - the source app is detected from it
snippety-migrate ~/Downloads/My-Snippets.csv -o snippety-backup.json
# The whole espanso match directory, one collection per file
snippety-migrate ~/Library/Application\ Support/espanso/match -o snippety-backup.json
# Everything spelled out
snippety-migrate ~/Downloads/My-Snippets.csv \
--format textexpander \
--collection "TextExpander" \
--strip-prefix ";" \
--tag imported \
--output snippety-backup.json
# See what would happen, without writing anything
snippety-migrate ~/Downloads/My-Snippets.csv --dry-run
# List the supported source formats
snippety-migrate formats
| Option | Description |
|---|---|
-f, --format | Source format. Detected from the file when omitted. |
-o, --output | Where to write the JSON. Defaults to stdout. |
-c, --collection | Collection for the imported snippets. Defaults to the input file name. |
--no-collection | Import without a collection. |
-t, --tag | Tag added to every snippet. Repeatable. |
--strip-prefix | Prefix removed from keywords, e.g. ";" for ;sig. Repeatable. |
--formatted html|rich|plain | How formatted snippets are handled. Default html. |
--date-language | Language written into date placeholders. Default English. |
--no-placeholders | Copy snippet bodies verbatim, without translating placeholders. |
-n, --dry-run | Report what would be imported without writing anything. |
-v, --verbose | List every migrated snippet. |
Run it with --dry-run first. You get the full list of snippets and every
warning without creating a file, which is the quickest way to see how much of
your library needs attention.
Importing Into Snippety
The result is an ordinary Snippety backup file - the same format the app itself exports - so you can import it in whichever way fits your situation.
You Are Starting Fresh
Open App Settings -> Backup and select Import Database. This replaces the
current database with the migrated snippets.
Leave Import app settings turned off (it is off by default). The migrated file carries no settings, so importing it with that option enabled would clear the preferences you have already configured.
You Already Have Snippets
Right-click the All collection in the Collection List and select Import Snippets. The migrated snippets are added to your database, keeping their collections and leaving everything you already have untouched.
Right-clicking a specific collection instead imports everything into that one collection.
From The Command Line
With Snippety Pro installed you can do the same from the terminal:
snippety import snippety-backup.json --mode append
See CLI - Export & Import and JSON File for the other import options.
After The Import
- Set your keyword prefix. Snippety adds its own prefix from
App Settings -> Snippet Expander, so a TextExpander keyword like;sigwould need;;sigif you keep the;. Strip it during the migration (--strip-prefix ";") and set the prefix in Snippety instead. If you prefer to keep the prefixes in the keywords, disable the global prefix - see Using Multiple Prefixes. - Read the warnings. They name the snippet, what could not be translated, and what to check. Everything untranslatable stays in the snippet as text, so nothing is silently lost.
- Check a few placeholders. Open two or three of the more complex snippets and expand them - see Placeholders for what Snippety's own syntax looks like.
- Search for leftovers. Searching for
%or{quickly finds snippets that kept a token from the old app.
What Carries Over
Placeholders are translated to Snippety's own syntax. The tables below cover the common ones; anything not listed is kept verbatim and reported.
TextExpander
The CSV export has three columns - abbreviation, content, label - which become Snippety's keyword, template, and name. Snippets without a label are named after their first line.
| TextExpander | Snippety |
|---|---|
%| | {@cursor@} |
%clipboard, %pasteboard | {@clipboard@} |
%filltext:name=X:default=Y% | {@text|X|Y@} |
%fillarea:name=X:default=Y% | {@multiline-text|X|Y@} |
%fillpopup:name=X:one:two% | {@selectable|X|one;two@} |
%filldatepicker:name=X:format=ll% | {@date|X|MMM d, yyyy|English@} |
%key:return%, %key:tab%, … | {@key|↩|0.2|1@} |
%snippet:abbr% | {@snippet|<id>@} |
%d, %m, %Y, %B, %H, … | {@calculated-date@} / {@calculated-time@} |
%@+2M (months), %@+6m (minutes) | the offset of the date that follows |
Adjacent date tokens are merged, so %d.%m.%Y becomes one
{@calculated-date|0|dd.MM.yyyy|English@} rather than three placeholders.
Formatted snippets are exported by TextExpander as HTML. By default the HTML is
kept as-is with the html syntax, which is lossless and stays editable as text.
--formatted rich converts it to Snippety's rich text instead, and
--formatted plain strips the markup.
Not translated: script tokens (%shellscript:…%, %applescript:…%,
%javascript:…%) stay in the template as text, and optional sections
(%fillpart:…%) keep their content while the markers are dropped.
aText
Groups become collections. Snippety's collections don't nest, so a nested group
is flattened into its full path (Examples & Guide / Date-Time Variable).
aText's keywords become tags and its note becomes the snippet description.
| aText | Snippety |
|---|---|
caret | {@cursor@} |
clipboard, clipboard history="2" | {@clipboard@}, {@clipboard-history|2@} |
| field | {@text|name|default@} |
| field (menu) | {@selectable|name|a;b;c@} |
| field (list) | {@multiselect|name|a;b|New Line@} |
datetime | {@calculated-date@} / {@calculated-time@} |
snippet | {@snippet|<id>@} |
key | {@key|⌃⇧H|0.2|1@} |
Fields sharing a name share a value in aText, so the first becomes a {@text@}
placeholder and the rest become
Variable Reference placeholders.
Not translated: calculation fields become plain input fields, and mouse variables, file variables, attachments, and clipboard regex transforms have no equivalent. Windows batch snippets keep their source as text.
Raycast
The export is a flat list, so everything lands in one collection.
| Raycast | Snippety |
|---|---|
{cursor} | {@cursor@} |
{clipboard}, {clipboard offset=1} | {@clipboard@}, {@clipboard-history|1@} |
{selection} | {@selected-text@} |
{argument name="X" default="Y"} | {@text|X|Y@} |
{argument name="X" options="a, b"} | {@selectable|X|a;b@} |
{snippet name="…"} | {@snippet|<id>@} |
{date}, {time}, {datetime} | {@calculated-date@} / {@calculated-time@} |
{… | uppercase} | the placeholder's transformation |
Not translated: {uuid}, {calculator}, and {browser-tab} have no
equivalent and are kept verbatim, as are the trim, percent-encode, and
json-stringify modifiers.
Rocket Typist
| Rocket Typist | Snippety |
|---|---|
%cursor% | {@cursor@} |
%clipboard% | {@clipboard@} |
%selection% | {@selected-text@} |
%textfield:name=X:default=Y:textfield% | {@text|X|Y@} |
%options:name=X:options=a, b:options% | {@selectable|X|a;b@} |
%key:key=tab:key% | {@key|⇥|0.2|1@} |
%snippet:abbreviation=…:snippet% | {@snippet|<id>@} |
%date:…:date% | {@calculated-date@} / {@calculated-time@} |
%date:…:showPicker=1:date% | {@date|X|…@} |
Not translated: Rocket Typist's localized short / medium / long date
styles have no format pattern of their own, so a default format is used and
reported.
espanso
Point the tool at a single .yml file or at the whole match directory - each
file becomes a collection. search_terms become tags and label becomes the
snippet name. espanso keeps its dynamic parts in a vars: block; each {{name}}
reference is replaced by the placeholder that variable describes.
| espanso | Snippety |
|---|---|
$|$ | {@cursor@} |
type: clipboard | {@clipboard@} |
type: echo | the value, inlined |
type: random | {@random-value|a;b@} |
type: choice | {@selectable|name|a;b@} |
type: date | {@calculated-date@} / {@calculated-time@} |
type: match | {@snippet|<id>@} |
type: shell / script | {@script|None|<command>|YES@} |
form: / form_fields: | {@text@}, {@multiline-text@}, {@selectable@} |
markdown: / html: | the markdown / html syntax |
Not translated: image_path matches keep the path as text. Snippety
placeholders cannot span newlines, so a multi-line shell command is joined with
;, and commands with comments, line continuations, or heredocs are left alone
with a warning instead.
Alfred
Each .alfredsnippets archive becomes a collection - point the tool at a
directory to take several at once. Alfred stores formatted snippets as RTF,
which is exactly what Snippety uses for rich text, so bold, color, and underline
carry over untouched.
| Alfred | Snippety |
|---|---|
{cursor} | {@cursor@} |
{clipboard}, {clipboard:2} | {@clipboard@}, {@clipboard-history|2@} |
{clipboard:uppercase} | the placeholder's transformation |
{date}, {time}, {isodate} | {@calculated-date@} / {@calculated-time@} |
{date +2y +3M +1d:EEEE} | {@calculated-date|+1d+3m+2y|EEEE|English@} |
{snippet:keyword} | {@snippet|<id>@} |
{random:a,b,c} | {@random-value|a;b;c@} |
Alfred's keyword prefix and suffix are set per collection while Snippety's are
global, so keywords are imported bare and the affix is reported for you to set
in App Settings -> Snippet Expander.
Not translated: {random:UUID} and {random:1..5} have no equivalent and
are kept verbatim.
Troubleshooting
- "Could not detect the format": pass the format explicitly, for example
--format rockettypist..csvis used by both TextExpander and Rocket Typist, and.jsonby both Raycast and aText, so the file contents decide - and a hand-edited export can confuse that. The guided run never has to guess, because it asks which app you are coming from first. - The import fails: make sure you selected the JSON file written by
snippety-migrate, not the original export. Snippety cannot read TextExpander or Alfred files directly. - Keywords need two prefixes: the source prefix was kept. Re-run with
--strip-prefix ";", or change the prefix inApp Settings -> Snippet Expander. - A snippet still shows
%something%or{something}: that token has no Snippety equivalent and was intentionally left as text. The warning printed during the migration says which snippet and why.