tpm2-software / tpm2-totp

Attest the trustworthiness of a device against a human using time-based one-time passwords
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
166 stars 37 forks source link

Refine CLI interface semantics #87

Open EvilBit opened 3 years ago

EvilBit commented 3 years ago

Before setting the CLI API in stone for a long time in milestone v1.0, I suggest remodeling the semantics of the sub-commands slightly.

For example: generate and calculate are semantically not too dissimilar and generate at least some amount of cognitive friction on usage (e.g. generate could just as well refer to generating the TOTP). I suggest e.g. the following transition:

Also refer to the request for a status command in #85. Great reference on modern and idiomatic CLI design e.g. here, specifically on sub-commands and noun verb vs verb noun ordering here.

This is less of a pressing issue, than an invitation for an open collection of ideas about future CLI design :)

P.S.: I hope, creating a number of issues is not considered rude - it surely isn't intended that way.

diabonas commented 3 years ago

I like init and show - the latter also matches the naming of the show-tpm2-totp helper that we use internally.

P.S.: I hope, creating a number of issues is not considered rude - it surely isn't intended that way.

Not at all! Using the issue tracker as a place to brainstorm new features and keep track of possible future extensions is perfectly fine, feel free to add here whatever comes to mind :)