Skip to content
/ gotp Public

Golang OTP library and Google Authenticator CLI

License

Notifications You must be signed in to change notification settings

major1201/gotp

Repository files navigation

gotp

Golang OTP library and Google Authenticator CLI

GoDoc Go Report Card

Installation

Download from the latest release page,

or install from source.

$ go get -u github.com/major1201/gotp/cmd/gotp

Use as command line

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

Contributing

Just fork the repository and open a pull request with your changes.

Licence

MIT

About

Golang OTP library and Google Authenticator CLI

Resources

License

Stars

Watchers

Forks

Packages

No packages published