dmenu for bitwarden-cli
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.5 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # bitwarden-dmenu
  2. [![npm](https://img.shields.io/npm/v/bitwarden-dmenu.svg)](https://www.npmjs.com/package/bitwarden-dmenu)
  3. [![node](https://img.shields.io/node/v/bitwarden-dmenu.svg)](http://npmjs.com/package/bitwarden-dmenu)
  4. [![GitHub](https://img.shields.io/github/license/andykais/bitwarden-dmenu.svg)](https://github.com/andykais/bitwarden-dmenu/blob/master/LICENSE)
  5. dmenu for [bitwarden](https://bitwarden.com/) which can copy usernames, passwords, and various fields to your
  6. clipboard.
  7. ## Usage
  8. ```
  9. $ bitwarden-dmenu --help
  10. Usage: bitwarden-dmenu [options]
  11. The DMENU_PATH environment variable can be used to point to an alternative dmenu implementation. Defaults to 'dmenu'.
  12. Options:
  13. --bw-list-args Arbitrary arguments to pass to bitwarden's 'list' command
  14. Defaults to nothing.
  15. --clear-clipboard Number of seconds to keep selected field in the clipboard.
  16. Defaults to 15s.
  17. --dmenu-args Sets arbitrary arguments to pass to dmenu
  18. Defaults to nothing.
  19. --dmenu-pswd-args Sets arbitrary arguments to pass to the dmenu password prompt
  20. Defaults to nothing.
  21. --session-timeout Number of seconds after an unlock that the menu can be accessed
  22. without providing a password again. Defaults to 0s.
  23. --stdout Prints the password and username to stdout
  24. --sync-vault-after Number of seconds allowable between last bitwarden sync and
  25. current time. Defaults to 0s.
  26. --on-error Arbitrary command to run if the program fails. The thrown error
  27. is piped to the given command. Defaults to none.
  28. --verbose Show extra logs useful for debugging.
  29. ```
  30. By default, this program runs at its most secure. No session is stored for any time period, the vault is updated
  31. every time it is used, and the clipboard is cleared every 15 seconds. In reality, you may want something a
  32. little more lenient. Here is the command I use in my personal i3wm config.
  33. ```bash
  34. bitwarden-dmenu --clear-clipboard 30 --session-timeout 100 --sync-vault-after 3600 --on-error 'xargs notify-send --urgency=low'
  35. ```
  36. ## Installation
  37. ```bash
  38. # login with bitwarden-cli once before using bitwarden-dmenu
  39. bw login
  40. # install the cli
  41. npm i -g bitwarden-dmenu
  42. ```
  43. ## Depends on
  44. - [dmenu](https://tools.suckless.org/dmenu/)
  45. - [bitwarden-cli](https://help.bitwarden.com/article/cli/)
  46. ## Credits
  47. Inspired by the no longer maintained [keepass-dmenu](https://github.com/gustavnikolaj/keepass-dmenu)