Cheatsheet

I'm not googling that again

Generate TOTPs from the command line

oathtool is a very useful utility to generate and validate OTP codes (and more).

Generate a TOTP from an existing secret

# The -b flag tells oathtool to expect the key in base32 encoding
# --totp tells it to compute the totp
oathtool -b --totp '<secret>' 

References