Some days ago, I discovered fzf, a fuzzy finder tool written in Golang. This tool is amazing and let you create very cool scripts in a few lines of bash with a “wow” effect. It is my new toy
I would like to share with you a small script, a passbolt cli tool with fuzzy search , made with fzf.
- a bash console
- The excellent go-passbolt-cli from @Speatzle
- fzf for fuzzy search
xclip to copy data to the clipboard with any Linux. MacOS users will have to use pbcopy, Windows WSL users can use win32yank or
- whiptail for passbolt resources creation
- pwgen to generate strong passwords
- a passbolt instance
The most important part is to ensure go-passbolt-cli is working (click here for instructions) and you are able to retrieve data from your passbolt instance eg.
# Replace id with a resource id :-) passbolt get resource --id b9dcba41-5880-4a23-8a4c-3ac3564cfa18
You will find the script on this gitlab repository: AnatomicJC / passbolt-terminal · GitLab
Once launched, you can use the fuzzy search to search your secrets. You have a small pane on the right to preview them.
Some shortcuts are available:
- ctrl + c to copy password to clipboard (depending of xclip on Linux, pbcopy on MacOs and win32yank on WSL)
- ctrl + u to copy username
- ctrl + l to copy URL
- ctrl + o to open a browser (edit the browser path in the script)
- ctrl + n to create a new resource
- ctrl + d to delete a resource
- ctrl + space to clear the search field
- Escape key to quit
If you want to know more about fzf and create your own scripts, have a look at these resources: