Alfred workflow for J.D

This is one for macOS/Alfred J.D enthusiasts.

I’ve been creating an Alfred workflow to work with a J.D system. I’ve got a basic version working right now which I’m finding useful myself, but I want to clean it up a bit and add a couple more features before I release it publicly.

What it does now:

You trigger the workflow with the ‘jd’ keyword (or whatever you choose to change it to) or you can set a global hotkey. You arrive with a choice of searching at the Area, Category or ID level.

You choose a level, then you are presented with all of the items at that level. For example, if you choose Category, you can filter through all of the categories (not just the categories with one area.

The same thing works for IDs: you can search all AC.ID folders under any Area > Category. Here I have started typing to narrow down to folders in my sewing patterns category, but I could equally search for ID folders in the ‘22 Tax’ category.

Filtering style can be set by users in the workflow itself, but I have found it most useful to have filtering set to ‘Match exactly from word boundary’. That way you can start typing a numerical code and ‘2’ will show you all the codes starting with 2, not 52, for example. You can also type part of the label if you want (e.g. ‘Tops’ or ‘Admin’) and that will also filter correctly.

Once you have filtered to your choice, you can act on the time by hitting Return (open in Finder/default app), Option+Return to browse in Alfred (enabling further actions), or Control+Return to open in Terminal.

The script (written in Go) reads the current state of the filesystem, so there is no need to cache anything or create a database: what you browse is the current state of your system.

What I’m working on now:

  • I’m planning to add another item to the workflow to enable the user to select a category (say ‘52 Sewing patterns’) and add a new item folder. It would prompt the user for a label (e.g. ‘Tops - Heron blouse’) and in the background it would check the highest ID currently in 52, add one and prepend that to the folder name before creating a folder labelled ‘52.44 Tops - Heron blouse’ in the right part of the folder hierarchy.
  • Facility to automatically update the workflow when I publish a new release on Github.
  • Add some tests
  • In the longer term I’d like the workflow to work flexibly with either AC.ID format or PRO.AC.ID, ideally automatically figuring out which system it is in. That’s a harder problem to solve and won’t be in the first release.

That’s about it - I’m hoping to release it publicly in a week or two for people to try out, but I’m having fun with it. I didn’t know any Go a week ago, so I’m impressed how easy it is to build a functional (and fast!) workflow using Dean Jackson’s awgo Go-Alfred workflow framework.

Do let me know if you’re interested, and if you have any ideas for features/functionality.


This looks epic. On my iPad now but will try out tomorrow.

Great! I haven’t released it publicly yet though - soon hopefully!

And here I’ve been fumbling around with just basic file searching of my J.D folders using Alfred. I want my next job to be linking to things and then sitting back while you make something cool with them! :slight_smile:

I’m also curious about your experience with Go. I’d like to learn something new that’s anything but JavaScript (I’ll leave that to everyone else on the planet). Go seems like a fun option. I love the idea of ending up with just a single binary.

1 Like

I still type words. Will there be some magic moment in the future when I remember that 51.19 is Miscellaneous under Dixon under Genealogy? or that 43.05 is Miscellaneous under Important Documents under, well, Miscellaneous?

@bsag I’m impressed! This may actually force me to finally purchase an Alfred Powerpack.

Speaking of, you can access 1Password from inside Alfred??? Huh…

:blush: It has been really fun to put together. Go is amazing. As someone who shied away like a frightened horse when she tried to learn C back in the day (pointers? :scream:), I’m surprised that I’m liking Go as much as I do! I think dabbling about with other languages has helped me grok some more conceptual stuff a bit more, and that has helped.

Go is a really nice language though: it’s quite compact with nice built-in libraries, so it is easy to get up and running quite quickly. Using the Go LSP in Emacs picks up on a lot of errors (and provides useful error messages), which means that if it builds, it’s quite likely to work.

I basically started working through the online tutorials on the Golang page last Saturday, and here I am writing actual working code today! It has helped massively to use the awgo framework though, as it sets up a lot helper functions for you, and the examples included get you 80% of the way there with different scenarios and help you to get started quickly.


That’s exactly why I wanted both options: I can search for a word if I can’t remember, but having all the codes in front of me as I search is already helping me to remember those for areas and categories, just by putting them in my face all the time.

A Powerpack is definitely worth it. I am completely at sea on a Mac without Alfred and its workflows!

Just bought. Just set up 1Password integration. Happy camper!

You have intrigued me w/ Go. I used to use it, sparingly, w/ Hugo. I found it more complex than eleventy so switched, but I may take a look. Not a programmer tho, so …

It’s the first thing I install on a new computer. I can not use one without it.

It’s one of the reasons I’m so miserable on Windows at work. My RSI is noticeably worse and I get instantly frustrated at the amount of hunting and pecking to find the thing I need.

I’ve been having a great time with Go recently. Highly recommend anyone to just give it a try…

Plans are forming in my mind to get to grips properly with JD system and a suite of tools written in Go to help.

My thoughts/plans include:

  • Managing multiple file systems. I’ve long kept things decoupled in life, Chromecast + dumb TV/Google Photos (switch between iPhone/Android, no signed into any browsers… many people think I make life hard for myself but it works for me :slight_smile:. This will require some sort of shared or centralised indexing to prevent or manage clashes. Git, probably!
  • JD-isms for common commands!
    • jcd
    • jmkdir
    • jmv
    • jls
    • pjd
    • jcode

I need to finish my current project website (written in Go & uses Pulumi!) and migrate whatever else I have into JD system. I am not looking forward to my Google Drive :see_no_evil:

Sounds really fun and useful!

In my Alfred workflow, I have just written the code to get the next AC.ID number and add the user’s label. Now I just need to do the scary bit of creating a new folder at that path. That will have to wait until the weekend!

1 Like

Want to be the first to add to the GitHub repo that I just created to collect this sort of thing? :smiley:

1 Like

I’d be delighted! :+1:

How will it work with updates? Submit another pull request when I publish an update?

Hmm interesting, yeah, I guess?

Unless you’ve also published it to your own repo/site/whatever somewhere that I can just link to?

I’m planning on publishing on my own GitHub repo so a link might work better.

Perfect. I’ll just build out the README with links.

OK, I think I have a working version! :partying_face:

You can find the repo here.

The instruction are in the README, but basically, you go to releases, download the latest *.alfred4workflow package and double click it to download. The updater is also working, so if I release a new version, it should automatically check and offer to download an install the new version. It slightly blew my mind when that worked!

I plan on working on this a lot more. Since I am new to Go, the code could be neater and more idiomatic, and I will probably split the different actions within the workflow into modules to enable more things.

For now, please post issues on the repo if you find bugs or have ideas for features. If you don’t have a GitHub account, just email me with the details of your issue (butshesagirl [at] rousette [dot] org [dot] uk).

@johnnydecimal Do I need to send you anything for your utilities repo, or will you just add the link?

I’m excited and terrified in equal measures to have this out in the wild!

1 Like

This works really well right out of the gate, thank you and nice work!

Yay! Glad it works for you.

Amazing! Added! I’ll be checking this out myself this morning.