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.
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
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.
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:
The first time you use alfroam, you need to point it to a download of your Database.
Export your Roam Database as
Unzip, put it a place where you will update it.
Copy path to the
- Right-click the .json file
- Press Option, “Copy as Path” will appear
- 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.