bitwarden-cli
bitwarden-cli
work with your bitwarden vault from the command line.
installation
brew install bitwarden-cliuse in scripts
to use bitwarden-cli in scripts, you can pass --raw to the unlock command and retrieve only the session token:
BW_SESSION=$(bw unlock --raw)
export BW_SESSIONunlock / lock
bw unlock
bw locksearch
you can also pass | jq to it since the output is in json
bw list items --search "dnscontrol"get username / password
use the search from above, and take the id to get the username/password:
bw get username "foo-bar-random-id"
bw get password "foo-bar-random-id"