Tools you’ll need:

I’ll demonstrate adding a Powershell alias below, but due to using cross-platform tools, the final command used should be fairly similar when used in a Bash / ZSH alias.

Open your Powershell profile in your editor:

code $PROFILE
# Or use micro / vim / notepad / etc.


Next, add the following function and alias:

# Replace <YOUR PROFILE> with your own path.
# Go to %APPDATA%\Mozilla\Firefox\Profiles\ look for ".default" in the name
# Update the Firefox.exe path at the end if needed.

function _ffb {sqlite3 C:\Users\AppData\Roaming\Mozilla\Firefox\Profiles\<YOUR PROFILE>\places.sqlite "select mbp.title,REPLACE(mb.title,'|','::'),mp.url from moz_bookmarks mb LEFT JOIN moz_bookmarks mbp ON mb.parent = mbp.id LEFT JOIN moz_places mp ON mb.fk = mp.id WHERE mb.type = 1;" | fzf | cut -d'|' -f3 | xargs "C:\Program Files\Mozilla Firefox\firefox.exe" {}}
Set-Alias -Name ffb -Value _ffb

Run . $PROFILE (remember the dot) to reload your profile.

Now simply type ffb (for “FireFox Bookmarks) to do a fuzzy search on your bookmarks by folder, title, and url from the command-line, and have it open in FF.

Examples

Example Search

Example Search

Example Search

Note: Any bookmarks with a | in their name will use :: in the search to avoid conflicting with the SQL output format. This will not edit your bookmarks.

More info: Profiles - Where Firefox stores your bookmarks, passwords and other user data