marcwebbie / passpie

:closed_lock_with_key: Multiplatform command-line password manager
http://passpie.readthedocs.org/
MIT License
921 stars 68 forks source link

Any reason to don't copy new password to clipboard? #38

Closed vitalk closed 9 years ago

vitalk commented 9 years ago

It would be nice to copy a new password to clipboard after creation. Especially if password has been created randomly.

$ passpie add alice@example.com --random
Password copied to clipboard
marcwebbie commented 9 years ago

Hello @vitalk No reason, however it should be an user choice, we shouldn't mess with user clipboard implicitly

Maybe something like this would be better:

passpie add alice@example.com --random --copy
marcwebbie commented 9 years ago

Thanks for the suggestion by the way. :)

vitalk commented 9 years ago

The explicit is better then implicit, so I completely agreed with you. But I like the idea of unifying api, so instead of:

passpie add @example.com --copy

I prefer something like this:

passpie add @example.com --output=clipboard

where output can be easily extendable to stdout, json, etc.

marcwebbie commented 9 years ago

I like --copy more. Or something like --clipboard. I don't see any use cases for the moment where someone would want they password exported to json.

Do you have any use cases you could share?

vitalk commented 9 years ago

I don't see any use cases for the moment where someone would want they password exported to json

I don't mean json explicitly, this is example of extendable api. The core feature of passpie is ability to read and write arbitrary secrets securely. But sending data via cli is often logged in shell history, so it is more secure to use files (I use the curl syntax to access files, e.g. @filename):

passpie add @github.com --from=@github-recovery-codes.txt --comment "Github recovery codes"

and to restore my secret back to file or copy to clipboard:

passpie copy @github.com --to=@github-recovery-codes.txt
passpie copy @github.com --to=clipboard
marcwebbie commented 9 years ago

Hey @vitalk.

It looks promising on the copy command. That'd be a nice feature.

On the add command I would go with --copy however. I liked the idea. :bowtie: