Accessing Finder aliases from the command line: alisma

Finder aliases are just that, easy to use in the Finder but unsupported at the command line, where symbolic links are much easier to work with. Here’s a new command tool, alisma, which should redress this situation a little.


alisma -a ~/Documents/myDoc.text ~/Desktop/testAlias
creates a new Finder alias named testAlias on the Desktop, which resolves to the existing document myDoc.text in ~/Documents. The command returns the full path to that new alias which it has just created.

alisma -p ~/Desktop/testAlias
resolves the alias testAlias on the Desktop, and returns the full path to the item pointed to by that alias, e.g.

Currently, in this initial version, those, and -h for usage info, are the only options supported. I intend in the next version to add support for Base-64 encoded Bookmarks as well as alias files, and possibly resolving to volfs paths as well if there is any interest in those.

This command tool should be compatible with El Capitan, Sierra, and High Sierra (HFS+ and APFS), and is available from here: alisma1
and in Downloads above.

Included in the download are the tool itself, the tool in a signed installer, a text readme file, and the source code in Swift 4.0.

Why the name alisma?

The traditional Mac file type code for Finder aliases is alis, to which I add the ma from bookmark. The resulting word also happens to be the name of the genus of plants commonly known as water-plantains, which are reputed to ward off fairies.

I hope this proves useful.