Closed ajmalsiddiqui closed 1 year ago
Thanks for your star! This is a nice idea! But if -t flag specifies TOTP algorithm, what would happen if a user specify -t and -h (HOTP) in the same command line? Since I don't have any prior experience developing a CLI tool, I think we need to do a lot of input checking here.
Would you like to contribute since you have better experience on developing CLI tool than I am?
Thank you!
Since it is a CLI tool, one common approach to the problem that you have specified here is to consider only the most recent flag. So if someone types -h -t
or -ht
, it will be considered as -t
only.
NPM modules like yargs
(I guess) and frameworks like commander
are easy ways to make CLI tools for NPM.
I made my CLI tool, autodot, using oclif - the open source CLI framework that powers the Heroku and Salesforce CLIs. But that will be overkill here.
I would like to help contribute the moment I find some free time. :)
Sure! Feel free to make the pull request once you are done :) Thank you very much :+1:
This module can be easily turned into a CLI tool, don't you think? Something like this for example: TOTP (-t flag specifies algorithm - TOTP, -a flag specifies hash algo, -d specifies digits):
hotp-totp-generator -t -a "sha512" -d "10" "my-totp-key"