biox / pa

a simple password manager. encryption via age, written in portable posix shell
https://passwordass.org
Other
506 stars 21 forks source link

better extensibility - specify password in arguments #13

Closed gaoDean closed 1 year ago

gaoDean commented 1 year ago

adds optional pass argument to add and edit

biox commented 1 year ago

thanks for the PR - can you explain what the use-case for this is? i am very unlikely to add any extra arguments to any of the commands, because it violates some assumptions & increases the complexity of pa quite a bit.

gaoDean commented 1 year ago

thanks for responding, I totally understand if you don’t want to merge this, but the use case is so other integrations can interface with it. Let’s say you want a gui interface for some kind of app, where the user inputs the username and pass, and pa stores it. It would be much easier to just

gaoDean commented 1 year ago

Whoops misclick, I’ll keep on going tho. It would be much easier to just pass the password as an argument, unless you have an easier way?

biox commented 1 year ago

unless you have an easier way?

i do! i would suggest just using age directly instead of using pa - pa is just a light wrapper for age, and i don't see much use in depending on it directly - age has a cli tool, but also has native libraries you can use that are specifically designed for just the sort of thing a GUI might want.

in short, it'd be better for you to just skip pa and depend directly on age. it could even remain pa-compatible if you'd like, so long as the identity files & stored passwords are in the correct place :blush:

gaoDean commented 1 year ago

Alright cool, thanks for responding so quickly!

arcxio commented 4 months ago

@gaoDean fyi you can also do this

~$ pa add name <<EOF 2>/dev/null
npassword
password
EOF
Generate a password? [y/n]: 
Enter password: 
Enter password (again): 
Saved 'name' to the store.
~$ pa show name
password

which is a hack, but it works nonetheless