Dashlane / dashlane-cli

👩‍💻 Dashlane CLI - Access your secrets in your terminal, servers and CI/CD
https://cli.dashlane.com/
Apache License 2.0
189 stars 52 forks source link

Add option to fetch login or email #216

Closed mzellho closed 8 months ago

mzellho commented 8 months ago

This PR adds a little option to lookup the login for a credential, similar to the password-option.

Mikescops commented 8 months ago

Hello,

Thanks for taking the time to open a PR here. I like the idea but I think dcli login is a little bit confusing as it may let think that's the way to login into the Dashlane account. Also, to avoid duplicating much code I think it would be better to use an option on dcli password instead. That way we can reuse most of the code and just make a condition when doing the copy in the pastebin. Something like dcli password --login.

Let me know what you think about this.

mzellho commented 8 months ago

My pleasure, thanks so much for this awesome tool that saves me so much time every day.

Initially, I was going with "username", but then realised that what I wanted to fetch is the login. So if you are okay with "user" we could also use this?

Of course, sub-options of password would also be possible and produce less duplicate code.

Your call, really 🙂

Mikescops commented 8 months ago

Alright, I'd go for the sub-option then, when I initially made the different commands I followed the content-types that we have in the vault : passwords, secure notes, secrets.

mzellho commented 8 months ago

Alright, I added the sub-options discussed and also introduced an option to to fetch the email. Any other bits of the credentials worth fetching via the cli?

mzellho commented 8 months ago

@Mikescops done, thank you!