I find instant, on-device search very conducive to productivity. Being able to quickly access my second brain reduces the friction for tapping ideas and insights stored away in the respective apps.

I use Alfred for pretty much everything. I search files, Evernote notes, I launch my suite of integrations and now I can browse (yes, browse) my Roam database as well.

Here is an overview of features:

Searching your Roam Database

All searches are performed on the local copy of your Roam database, which is pretty fast. Since there is no Roam API, you have to periodically download a new copy, or use my private API script to do so.

After installing the workflow, you can launch Alfred and type r – it will present you with the list of your Pages.

When you start typing your query, it will continue to search within all blocks.

You can also search pages only when you start your query with [[ – that should be familiar:

When you click TAB, pages get auto-completed to page name and blocks to the block reference:

TAB also lets you navigate the structure of the page by going “UP” or “into” a block

You can also search for a block within a specific page

Actions

Enter opens your Roam block in a browser

Unfortunately, that does not work for Pages, because DB dump does not contain uids yet 🙁

But you can open page’s first child and then go “up” in Roam itself.

CMD+L Shows the content of a block in a dark overlay.

When the content of the block is a URL – ENTER will go to that URL instead

This lets me use Roam as a bookmark manager.

CMD+ENTER will copy the content of the block and automatically paste to the frontmost window

This let’s me use Roam as a snippet manager / quote database etc.

Installation

Once you download Alfroam.alfredworkflow from the release page, double-click it and Alfred will install the workflow. You have to continue with setup next.

If you want to be alerted about my new hacks and workflows for Roam, sign up to my newsletter:

Sign up to get Deliberate Internet straight to your inbox

I write about the psychological and technical aspects of the Internet, focusing on remote work, online economy, and cognitive load. Every monday.

Please wait, we are contacting the carrier pigeons...

Thank you for sign up! Now please head on to your inbox to confirm your email address.

Setup

The first time you use alfroam, you need to point it to a download of your Database.

Export your Roam Database as .json

Unzip, put it a place where you will update it.

Copy path to the .json file

  1. Right-click the .json file
  2. Press Option, “Copy as Path” will appear
  3. Copy as path

Point Alfroam to the database

When you type r and paste, it should be ready:

And that’s it! Now you should be able to search your notes.

Updating the database

Now that Alfroam is pointed to the file that contains your graph, it will keep that reference. If you update this file – Alfroam will use the new version.

If you find that tedious, you can use my Roam Research Private API project to automatically download the file for you.

Leave a Reply

Your email address will not be published. Required fields are marked *