English | 简体中文
bzfm is a fuzzy bookmark manager for files and directories, rewritten in Node.js/TypeScript.
It is inspired by tools like fzf, zoxide and the original zfm zsh plugin.
This project reimplements the core idea of zfm in Node.js, and extends it with a structured CLI
and multi-shell integration.
- Fuzzy bookmark management for files and directories
- Simple plain-text bookmark file (
~/.bzfm.txtby default) - fzf-based interactive selection
- Shell integration:
- Zsh: Ctrl+O to insert bookmarks, Ctrl+P to jump to bookmarked directories
- Fish: Ctrl+O / Ctrl+P bindings
npm install -g bzfmRequirements:
- Node.js >= 18
fzfinstalled and available in$PATH
Basic commands:
bzfm add <paths...>– add one or more paths (files or directories).bzfm list [--files] [--dirs]– list bookmarks, with[d]for dirs and[f]for files.bzfm select [--files] [--dirs] [--multi]– fuzzy-select bookmarks viafzf.bzfm query [--files] [--dirs] <pattern>– fuzzy-select with an initial query.bzfm fix– remove bookmarks that no longer exist.bzfm clear– clear all bookmarks.bzfm edit– open the bookmark file in$EDITOR(default:vim).
Bookmark file:
- Default path:
~/.bzfm.txt - Override via
BZFM_BOOKMARKS_FILEenvironment variable.
bzfm provides an init subcommand to output shell integration code.
Add to your ~/.zshrc:
# Default shorthand command: bz
eval "$(bzfm init zsh)"
# Custom shorthand command name (e.g. b)
# eval "$(bzfm init zsh --cmd b)"
# Disable shorthand alias, only keep keybindings and f()
# eval "$(bzfm init zsh --no-cmd)"Add to your config.fish:
# Default shorthand command: bz
bzfm init fish | source
# Custom shorthand command name (e.g. b)
# bzfm init fish --cmd b | source
# Disable shorthand alias, only keep keybindings
# bzfm init fish --no-cmd | sourceRuntime language is detected via:
BZFM_LANGenvironment variable (zh_cnoren_us)- Fallback to system
LANG(zh*→zh_cn, otherwiseen_us)
Supported locales:
en_uszh_cn
The original zfm project is licensed under the MIT License.
This project reimplements zfm in Node.js/TypeScript and is also distributed under the MIT License.
See the LICENSE file for details.
Original project: https://github.com/pabloariasal/zfm