Zsh plugin for quickly accessing Bitwarden secrets with auto-completion, caching, and TOTP support — securely and efficiently.
- Secure access to passwords and TOTP codes
- Fast item lookup with tab-completion
- Encrypted local cache of items (auto-refreshed every 6 hours)
- Uses your existing Bitwarden CLI session if available
- Minimal dependencies:
bw
,jq
,oathtool
(for TOTP)
- Bitwarden CLI (
bw
) jq
- [
oathtool
] for TOTP functionality (installed by default on many systems)
zinit wait lucid for \
casonadams/bitwarden.zsh
ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}"
git clone https://github.com/casonadams/bitwarden.zsh.git "$ZSH_CUSTOM/plugins/bitwarden.zsh"
then add it to your .zshrc
:
plugins+=(bitwarden.zsh)
Having issues?
Try removing old cache files:
rm -f /tmp/.bw_items_cache* /tmp/.bw_session
bwpass github.com/[email protected]
Or use interactive auto-complete:
bwpass <TAB>
bwtotp github.com/[email protected]
Or interactively auto-complete:
bwtotp <TAB>
# Copy password for AWS
bwpass aws.amazon.com/[email protected]
# Copy TOTP for GitHub
bwtotp github.com/[email protected]
# View available entries
bwpass <TAB>
bwtotp <TAB>
- Cache issues? Try:
rm -f /tmp/.bw_*
.