TOTP in your terminal (with built in add to clipboard) written to go. This is a quick hack and the secret keys are hard-coded into the binary for this example.
Get your TOTP Codes from Authy via alexzorin/authy: authy-export
AUTHY_EXPORT_PASSWORD='<MY_EXPORT_PASSWORD>' go run cmd/authy-export/authy-export.go
otpauth://totp/....?secret=redacted
otpauth://totp/....?secret=redacted
otpauth://totp/....?secret=redacted
> go run totp.go
or
❯ ./totp-go
226139 gitlab
445113 google
717220 personal
Web Browser for easy pasting:
❯ ./totp-go per
127635 personal Copied to Clipboard
Can be used in bash substitution:
❯ ./totp-go per !
127635
# Sync packages
go mod tidy
# Run Code
go run totp.go
# Build Binary
go build
# Run Binary
./totp-go sec
# Copy to local bin
cp totp-go /usr/local/bin