Golang OTP library and Google Authenticator CLI
Download from the latest release page,
or install from source.
$ go get -u github.com/major1201/gotp/cmd/gotp
Set DB file
# set DB file with envvar
export GOTP_DBFILE=/var/lib/gotp/default.db
# or you can specify db file path every time you execute gotp
gotp --database /var/lib/gotp/default.db
Add an OTP with URI provided
gotp add --uri otpauth://totp/ACME%20Co:[email protected]?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30
Add an OTP with detailed arguments
gotp add --issuer "ACME Co" --accountname "[email protected]" --secret HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ
Display all otp objects and generate values
gotp
# with ID
gotp --id
Delete otp objects
gotp delete 11 13
Export all otp objects
gotp export
Just fork the repository and open a pull request with your changes.
MIT