doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
620 stars 83 forks source link

feature request: rename password entry, edit username #35

Open as3ii opened 3 years ago

doy commented 3 years ago

can you say more about what you'd like here?

as3ii commented 3 years ago

I think that could be cool to have the possibility to edit the entries, such as rename an entry or edit the username. 2021-02-19_18-31 ^ this is an example of the item editor available inside the web client, the fields "Name" and "Username" are the ones I was talking about

rjc commented 3 years ago

Hello,

Commenting here rather than opening a new issue as, essentially, the OP is describing the problem I have.

I have created a new entry with:

rbw add ...

but forgot to add a username - there's no way to add it post factum. Similar issue would be if I had done a typo anywhere but the password.

Also, given that rbw supports TOTP, it would be great if one could add/edit the secret, too. Side note, any chance to rename code to totp or at least provide the latter as an alias? code seems to generic a term and Bitwarden doesn't support anything else but TOTP.

To sum it up, it would be great if most (all?) fields were editable as is the case with, i.e. lastpass-cli.

Whilst the title of this issue reads feature request, it seems like this (basic?) functionality is simply missing, at least to me. I guess what I'm trying to say is that, like with other fully-featured command line software, i.e. mutt, lastpass-cli, etc., I don't want to use WebUI/GUI at all! :^)

Regards,

Raf

rjc commented 3 years ago

Hello,

Are there any prospects of getting this functionality in future releases?

Cheers,

Raf

dezeroku commented 1 month ago

I bumped into this when trying to change username/email address for one of the entries. I'd be happy to drop a PR for this.

The biggest problem here seems to be parsing the input data. I'm not a big fan of forcing users to edit JSONs, so maybe we could use YAMLs? So on the call to rbw edit we would open the editor with the existing fields prepopulated, e.g.:

password: some-password
username: some-username
uri:
  - https://example.com

user then would edit the specific fields and on the rbw's side we would iterate over the keys returned and apply changes only for them.

So with this implementation you could do something like this to modify a single field in the entry:

password: new-password

and something like this to remove a single field:

some_entry: null

Adding new fields should also feel quite natural.

WDYT?