CLI tool for managing directory bookmarks.
Requires Go 1.25.5 or later.
go install github.com/xrzks/cdbm@latestAdd this line to your shell config (usually ~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish):
eval "$(cdbm init zsh)"
# or for bash
eval "$(cdbm init bash)"
# or for fish
cdbm init fish | source# add a bookmark (current directory)
cdbm add
# add with custom name
cdbm add --name projects
# add with custom directory
cdbm add --name docs --directory ~/Documents/docs
# list all bookmarks
cdbm list
# navigate to a bookmark
cdbm projects
# edit a bookmark (rename)
cdbm edit projects --name my-projects
# edit a bookmark (move)
cdbm edit docs --directory ~/Documents/docs-new
# edit a bookmark (rename and move)
cdbm edit projects --name my-projects --directory ~/dev/projects-new
# delete a bookmark
cdbm delete projectsOnly letters, numbers, ., _, and - (max 100 chars).
Default locations:
- Store file:
~/.config/cdbm/store.json - Config file:
~/.config/cdbm/.cdbm.json - Debug logs:
~/.local/state/cdbm/logs.jsonl
Environment variables:
XDG_CONFIG_HOME: Override config directoryXDG_STATE_HOME: Override state directory (for debug logs)
Config options (in .cdbm.json):
{
"store_path": "/path/to/store.json"
}Enable debug logging to troubleshoot issues:
cdbm --debug add --name testLogs are written to ~/.local/state/cdbm/logs.jsonl.
- Symlinks are rejected for security
- All directory paths are validated and normalized
- Sensitive files are written with restricted permissions (0o600)