Official Bitwarden cli client¶
Install¶
cd /tmp/
wget 'https://vault.bitwarden.com/download/?app=cli&platform=linux' -O bw.zip
unzip bw.zip
mv bw /usr/local/bin
Arch / Manjaro:
Debian:
Alpine container¶
bwfails inalpine:3.20.3: lots ofError relocating …: symbol not founderrors- Related: Error relocating /usr/lib/libcurl.so.4: SSL_get0_group_name: symbol not found
After installing libstdc++ and libgcc alpine packages I can't get further
than:
Error relocating /root/.local/share/mise/installs/bitwarden/2024.10.0/bin/bw: fcntl64: symbol not found
Although there's a Alpine bitwarden client container image which seems to work.
Configure¶
- config file at
~/.config/Bitwarden\ CLI/data.json
Configure endpoint:
Export env vars by adding them to ~/.config/shell/common/env_local, i.e.
BW_ORG:
Multiple accounts¶
Usage¶
Login¶
Logging in with email and password is recommended for interactive sessions
Unlock¶
Interactively unlock safe:
Unlock safe using BW_PASSWORD env var:
Export session env var:
Etc¶
List personal items:
Get item by id:
Collections¶
If you are trying to perform user management on your organization, you won’t be able to use the BW CLI. The CLI is designed to work with your vault contents, but user management or other organizational management tasks must be performed using the web vault interface, and cannot be accomplished using the Bitwarden app, browser extension, or CLI.
List org-collections:
Get org-collections template:
Backup / export¶
- The UI client can only export personal items, not organisation items.
- Backup/export organisation vault
- None of the export methods export the personal folders where the items are stored.
csv¶
Important: CSV-export doesn't always export all items, without any notice !! I exported my test-vault (5 items) to json and csv: The json file contained all entries, while the csv file only contained 2 !
CSV-Format:
Json¶
Json export contains much more details, like:
collectionspasswordHistoryrevisionDatecreationDatedeletedDateidorganizationIdfolderIdtype(integer: probably login, card, identity etc.)favoritecollectionIds
Issues¶
Other¶
Performance¶
Comparism of time spent fetching a password:
| Tool | milliseconds |
|---|---|
| bw | 3689 |
| rbw | 11 |
| gopass | 26 |