solokeys / solo1-cli

Solo 1 library and CLI in Python
https://pypi.org/project/solo-python
Apache License 2.0
185 stars 69 forks source link

Add two utility function dfu-all and dfu-ls #50

Closed cuongnv closed 4 years ago

cuongnv commented 4 years ago
nickray commented 4 years ago

Hi @cuongnv, thanks for contributing to solo-python!

I think dfu-ls is already implemented in solo ls --all (or -a), can you confirm?

Generally, the solo command uses subcommands to implement functionality, not kebab-case commands as in your pull request. I would like to keep it that way, so the CLI API is consistent and discoverable.

Moreover, all commands that involve a key either

I agree it would be good to be able to operate on all keys (although error handling is a bit tricky). The logical choice to me would be -a/--all. An alternative would be -e/--every, what do you think?

For your dfu-all, I would suggest you implement such an --all flag (with synonym -a) for the existing solo program dfu command. Would that work for your use case?

For that, would additionally replace the -a synonym of --connect-attempts everywhere, e.g. with -c.

cuongnv commented 4 years ago

You are right, should do as you recommend to make more consistent and discoverable. :)