No description
- Shell 77.6%
- Python 22.4%
| bin | ||
| docs | ||
| lib | ||
| tests | ||
| .gitignore | ||
| bootstrap.sh | ||
| install.sh | ||
| README.md | ||
bw-zsh
Bitwarden/Vaultwarden helpers for zsh and tmux with an interactive, colored installer.
One-liner install:
curl -fsSL https://git.brznet.fr/brz/bw-zsh/raw/branch/main/bootstrap.sh | bash
Features:
- self-hosted Vaultwarden/Bitwarden or Bitwarden cloud configuration
- proxy mode selection:
off,keep, orcustom - configurable zsh keybinding for the picker
- tmux module that works while you are inside SSH sessions
- automatic dependency installation when possible
- login email saved in GNOME Keyring with
secret-tool bw-session-start/bw-session-stop- local
bw servefor the session fzfpicker for password, username, combined insert, or TOTP
Files:
lib/bw-zsh.zsh: zsh functions, aliases, keybinding, proxy/server logicbin/bw-fzf-select: shared local picker helperbin/bw-tmux-picker: tmux-aware picker that pastes into the active paneinstall.sh: colored CLI installer
Install interactively:
cd ~/dev/bw-zsh
./install.sh
exec zsh
Install non-interactively:
./install.sh \
--non-interactive \
--server-type self-hosted \
--server-url https://vault.example.test \
--proxy-mode off \
--bindkey '^X^B' \
--tmux-mode popup \
--tmux-key M-b
Important installer flags:
--server-type self-hosted|cloud--server-url URL--proxy-mode off|keep|custom--proxy-url URL--bindkey KEYSEQ--serve-port PORT--tmux-mode off|popup|split--tmux-key KEY--bw-bin PATH--install-deps--skip-install-deps--non-interactive
Dependency handling:
- installs missing system dependencies with
pacman,apt-get, ordnfwhen available - installs the Bitwarden CLI with
npm --prefix ~/.localifbwis missing - installs
tmuxautomatically when tmux mode is enabled and the package manager is supported
Commands after install:
bw-login-email-set [email]bw-login-email-showbw-login-email-clearbw-session-startbw-session-stopbw-tmux-syncbw-tmux-clear
Picker usage:
- zsh: press the configured bindkey, default
Ctrl-X Ctrl-B - tmux: press the configured tmux key, default
M-b Enter=> passwordCtrl-U=> usernameCtrl-B=> username + passwordCtrl-T=> TOTP
tmux behavior:
popup: opens a tmux popup, runs the picker locally, pastes the selected value into the current panesplit: opens a temporary split pane for the picker, then pastes into the original pane- this works even when the active pane is an SSH session, because tmux captures the shortcut locally
- when
bw-session-startruns and a tmux server exists, the currentBW_SESSIONis synced automatically into tmux - if you unlocked Bitwarden outside tmux first, run
bw-tmux-syncto push the current session into tmux manually
Managed config blocks:
- zsh block in
~/.zshrcbetween:# >>> bw-zsh >>># <<< bw-zsh <<<
- tmux block in
~/.tmux.confbetween:# >>> bw-zsh-tmux >>># <<< bw-zsh-tmux <<<
Generated config files:
~/.config/bw-zsh/env.sh~/.config/bw-zsh/bw-zsh.zsh~/.config/bw-zsh/tmux.conf
After install:
exec zsh
tmux source-file ~/.tmux.conf