Genie is a tool for assigning arbitrary tags to file paths, and then performing search operations on those tags.
Like any person, I organize my files in a standard way on the machines that I use regularly:
~/Users/ ├── Desktop ├── Documents │ ├── Personal │ ├── Work ├── Downloads ├── Documents ├── Repos │ ├── APL │ ├── C │ ├── CPP │ ├── Go │ ├── Guile │ ├── JS . . .
This has its advantages, such as knowing where to go when looking for some particular project. This structure falls over for projects with components in multiple languages however, such as a Swift API with a JS client. In that case, this kind of file structure relies on naming conventions to indicate that two directory trees at
Repos/JS/projectx-client are part of the same project.
This is where
genie comes in handy, because the Swift API’s directory and the JS client’s directory can be assigned the same tag of “projectX” and then use
genie search projectX to see all of the filepaths that are associated with that project’s tag.
The other times where
genie is useful is remembering every few months where exactly in a large codebase some change needs to be made. This is where
genie really shines in my day job where I seem to do many semi-regular drive-by pull requests in the same area of the monorepo and can tag some deeply nested file with a self-evident tag.
genie is essentially a very small command line tool written in Swift that wraps some sqlite queries, but it serves its purpose well.
You can read more about
genie in the very nascent docs.