#!/usr/bin/env bash # Interactively generates an OTP-auth url (written for pass-otp) # # Example: passotpuri LABEL SECRET [QUERYSTRING] read -p "Enter the label or issuer:" label read -p "Enter its OTP secret:" secret read -p "Enter type (leave blank for totp):" type echo "otpauth://${type:-totp}/$label?secret=$secret&issuer=${issuer:-$label}"