#pass #first-line #show #clipboard #qrcode #manager #otp

bin+lib pass-fu

Rusty wrapper around the legendary pass - Foo Pass!

5 releases (stable)

1.0.3 Mar 6, 2023
1.0.1 Dec 7, 2022
1.0.0 Dec 6, 2022
0.1.0 Dec 6, 2022

#6 in #first-line

MIT license

23KB
530 lines

Pass-Fu

pass fu crates version

Implemented in vanila pass:

  • pass show print the whole file on the output
  • pass show --qrcode[=N] shows a neat QR code for the selected or first line
  • pass show --clip[=N] copy the chosen line number or first line to clipboard

The pass manager is solid. UI apps are cute. And for efficiency - Pass-Fu.

Pass-Fu is extending the pass manager:

  • show --output=N print only the chosen line to the output (zero based)
  • entry picker - if the path is not rooted or is a directory you'll be prompted to chose one (dmenu, wofi...)
  • line picker - if the file has multiple lines you'll be prompted to chose one (dmenu, wofi...)
  • OTP handler - automatically recognize OTP URI and let you choose if the OTP secret or OTP code is desired (dmenu, wofi...)
  • show --type=N directly type the input (xdotool, ydotool,...)
  • make it more configurable, currently hardcoded options
  • show new opts in help

Pass-Fu is aiming to overlay the pass manager - let it do what it does well and improve it where it's lacking. You can alias pass=pass-fu as pass-fu tries to be compatible. pass-fu still calls the original and the alias will preserve autocompletion.

Install

Rustaceans:

cargo install pass-fu

Then make it your default pass interface (in .profile):

alias pass=pass-fu

Or with a symlink to your local bin folder:

ln -s "$(which pass-fu)" ~/bin/pass

Usage

Currently, only the pass show command is extended:

Use pass as normally. If you show a dir or omit the path, dmenu prompt will appear with a list of entries. Then if the file has multiple lines, it will let you chose the line. And if the line is an OTP secret URL, it will also let you generate the token.

Besides the --clip (-c) and --qrcode (-q) options, there is:

  • --type (-t) to type the secret
  • --output (-o) to write to output

All these take a line number arg, for instance --type=2 but that's not too useful since you have that picker anyway.

Dependencies

~1.9–2.7MB
~80K SLoC