Show the most recent N Bitwarden vault items from the CLI.
bw-recent.sh logs into or unlocks the Bitwarden CLI, syncs your vault, and prints a table of the most recently created items with name, username, type, and created timestamp.
- Bitwarden CLI (
bw) installed and available on yourPATH - Python 3 available as
python3 - A Bitwarden account
Make the script executable:
chmod +x bw-recent.sh./bw-recent.shShow a specific number of recent items:
./bw-recent.sh 10The script prints a table like:
# Name Username Type Created
--------------------------------------------------------------------------------------------------------
1 Example Item user@example.com Login 2026-03-17 10:15
- If your vault is locked or unauthenticated, the script will prompt to log in or unlock.
- The script uses the Bitwarden session token (
BW_SESSION) for the current shell session. - Items are sorted by creation date (falling back to revision date when needed).
Error: Bitwarden CLI (bw) is not installed.Install the CLI from https://bitwarden.com/help/cli/ and ensurebwis on yourPATH.
The script stores the session token in the current shell environment only. Close the shell to clear it, or unset it manually:
unset BW_SESSION