schmich / ward

Secure password manager
MIT License
4 stars 0 forks source link

ward list #12

Closed dylanmei closed 8 years ago

dylanmei commented 8 years ago

Hello. This is a great project. I've been using it for almost a month now.

Often I'd like to view a list of my accounts. I can do that using ward export:

% ward export | jq -r '.[] | "realm: \(.realm), login: \(.login)"'

However, it would be even better if it was a native command.

schmich commented 8 years ago

Hi Dylan, thanks for the kind words!

That sounds reasonable. I'm on a flight today, so I'll have some time to work on this. It should be a quick change.

I'm imagining a list of accounts like <login>@<realm>:

foo@email.com
foo@email.com@linkedin.com
username@twitter.com
admin@HOMEWIFIAP

The other option would be an ASCII-styled tabular display with separated login/realm columns.

The command will probably be ward list as you suggested. Would you also want to see the password/note fields, or are you just interested in login/realm?

Also, just curious, can you describe your scenario?

dylanmei commented 8 years ago

Gosh, my scenario is rather human: I can't remember if I've signed onto a site already, or if I've got the spelling right with dashes or spaces and so on. I have about 103 entries today, a few of them variations on the same site. Trial and error with ward copy is painful, so I'd rather list and grep.

Tabular sounds great to me. Login, Realm, and perhaps Note. Personally I wouldn't expect the password to be casually revealed. Some future github-issue-person might reasonably request a --show-password option, but not me.

I've used this package in the past with great success: http://github.com/rodaine/table

schmich commented 8 years ago

I've added ward list to version 0.0.4. The output was bad for me when I included the note field since I have some long notes which caused each line in the table to be wider than the console window itself, which caused text wrapping. So, currently, I'm only including login and realm.

The table package you linked doesn't seem to easily support truncating text in specific columns, so I'm going to play with it more before adding notes back in. I'm still poking at colors and formatting, but for now, this works. Let me know what you think.

dylanmei commented 8 years ago

Hey I think this is great! The notes field is nice to have but I can see how it amps up the complexity. Thanks!

schmich commented 8 years ago

Fixed with e024cadbb9aa026e4f84f0f76c7693af9e2ef084. I'll look more into formatting and adding notes.