genie - a tool for tagging arbitrary file paths with arbitrary tags
Download the latest release, and put the binary somewhere in your shell’s PATH. Using an install location of
/usr/local/bin is a popular choice.
genie --help to see usage instructions
|short flag||long flag||description|
||Prints help information|
||Prints version information|
||Gives output as json string for use in Alfred (only used by the
||Prints out a listing of all tags used in genie (only used by the
||n/a||Prints this help message|
||n/a||remove from the given
||search for and return all paths that have all of the tags given in
||show all tags applied to the given
||tag the given
Once you’ve started tagging your filepaths with meaningful tags, you may find yourself wanting to quickly find and action a particular filepath. One way to do this is using the
search command in a terminal. A more graphical way is to use Alfred.
Installing the Alfred Workflow
In order to use genie’s
search command from within Alfred, you must first install the Genie Workflow for Alfred.
- Install Alfred
- Download the Genie Workflow
- Double-click on the downloaded file in Finder
- Follow the on-screen instructions to install the workflow into Alfred
Using the Alfred Workflow
While you can use the Alfred workflow with the
search command. To use the workflow to search for all filepaths with a given tag
- Invoke your configured Alfred hotkey(s)
g search TAG(or
g s TAG) replacing
TAGwith the tag that you would like to search for
- Select the filepath that you’re interested in, and action it as desired.
Some common actions include quicklooking the file with either the
shift key or
cmd + y. Once you’re quicklooking a filepath, Quick Look often has additional actions that you can take such as opening a file in a particular application.
On macOS, genie uses
~/Documents/.geniedb as the location of its backing sqlite store. If there is not a file to be found at that location whenever
genie is invoked, it will create the file and the requisite sqlite table(s).
If you are feeling adventurous, after you’ve invoked
genie at least once to create the file and needed tables, you can move that sqlite document to any location and symlink it back to the original path of
~/Documents/.geniedb. As an illustrative example, after you’ve invoked
genie at least once, you can do something like
mv ~/Documents/.geniedb ~/Dropbox/geniedb ln -s ~/Dropbox/geniedb ~/Documents/.geniedb
Once you’ve done this, genie will traverse the symlink and the backing store for genie can be synced and shared across multiple machines. This means that when using the
search command, the returned paths may not live locally on the machine that you’re invoking
genie from. You will need to pay attention to the indicated host and then locate the file on the corresponding machine in order to interact with it.
Running a development version
- Clone the project
- Build with
swift build -c releaseto build a version with debugging symbols stripped out)
- Install by copying the binary from the architecture specific folder in
.build/to a location in your PATH environment variable. This usually looks something like
cp .build/x86_64-apple-macosx/release/genie /usr/local/bin
- Alternatively you can run the built version from within the
genie is copyright 2017, 2018, 2019, 2020 zach wick firstname.lastname@example.org and is licensed under the GNU GPLv3 or later. You can find a copy of the GNU GPLv3 included in the project as the file named License.