You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.2KB

2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # OTP CLI
  2. ## What is this ?
  3. Simple TOTP/HOTP command line
  4. ## How to install ?
  5. To install it, simply use `gem install otp-cli`
  6. This tool requires `zbar-tools` for QR code import and `imagemagick` for QR code display (currently no simple way to do this with pure Ruby)
  7. ## How to use it ?
  8. Usage: otp [options] <filter>
  9. -a, --add STRING Add secret from string
  10. -i, --img PATH Add secret from QR code
  11. -q, --qrcode NAME Display qrcode
  12. To add a secret, import from a string or from a QR Code
  13. otp -a otpauth://totp/name?secret=ASECRET
  14. otp -i /tmp/qrcode.png
  15. Secrets are saved onto `$HOME/.otp`. You can override location with `OTP_CONFIG` environment variable.
  16. Supported OTP URI options are
  17. * name (mandatory)
  18. * secret (mandatory)
  19. * issuer
  20. * algorithm (default to SHA-1)
  21. * digits (default to 6)
  22. * period (default to 30s)
  23. To issue a PIN
  24. otp OTP
  25. such OTP
  26. 595905 (25s)
  27. PIN is automatically copied into your clipboard
  28. If multiple OTP match your filter, you will be asked for the one to use:
  29. otp OTP
  30. [1] such OTP
  31. [2] wow OTP
  32. [3] many OTP
  33. 2
  34. wow OTP
  35. 272784 (1s)
  36. If you need to display a secret on a QR code, for example to import the OTP elsewhere
  37. otp -q OTP