Go-passbolt-cli tool with fuzzy search

Hello there :wave:

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 :yo-yo:

I would like to share with you a small script, a passbolt cli tool with fuzzy search :yum:, made with fzf.

Some requirements:

  • 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 C:\Windows\System32\copy.exe
  • 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

Live preview:

passbolt-terminal-750

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 :slight_smile:

If you want to know more about fzf and create your own scripts, have a look at these resources:

Please enjoy!

3 Likes

I really appreciate your classy style @AnatomicJC. This is so clean and thoughtful. :trophy:

1 Like

Thanks @garrett :hugs:

I played a bit yesterday with it and added some other features:

  • ctrl+o to open resource URL with a browser
  • ctrl+n to create a new resource
  • ctrl+d to delete a resource

I updated the original post :slight_smile:

1 Like