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.zshZSH_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_sessionbwpass github.com/john@example.comOr use interactive auto-complete:
bwpass <TAB>bwtotp github.com/john@example.comOr interactively auto-complete:
bwtotp <TAB># Copy password for AWS
bwpass aws.amazon.com/user@example.com# Copy TOTP for GitHub
bwtotp github.com/user@example.com# View available entries
bwpass <TAB>
bwtotp <TAB>- Cache issues? Try:
rm -f /tmp/.bw_*.