gopher-totp

command module
v0.0.0-...-eb9d101 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 18 Imported by: 0

README

Gopher TOTP

A minimal CLI to generate TOTP codes from a Base32 secret or otpauth:// URI.


Usage

Base32 secret

echo "JBSWY3DPEHPK3PXP" | gopher-totp

Example output:

Ctrl+C to exit.
Expires in: 13s | Code: 944391

otpauth URI

You can also pass a full TOTP provisioning URI:

echo "otpauth://totp/example?secret=JBSWY3DPEHPK3PXP&period=30&digits=6" | gopher-totp

The URI values are used as defaults but can still be overridden by CLI flags.

Example:

echo "JBSWY3DPEHPK3PXP" | gopher-totp --pretty --clip

GNU Pass Integration

You can pipe a TOTP secret stored in pass directly into gopher-totp:

pass show totp/example.com | sed -n '1p' | gopher-totp

Or create a convenient alias:

alias pass-totp='sed -n "1p" | gopher-totp'
pass show totp/example.com | pass-totp

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL