So for those who use OnetimeSecret all the time, you can add this little function to your .bashrc
(or similar) So then you don’t have to openh a browser to share your secret!
onetimesecret() {
if [ $# -eq 0 ]; then echo "No secret specified";return 1; fi
secret=$(curl -s -F "secret=$1" https://onetimesecret.com/api/v1/share | cut -d '"' -f12)
echo https://onetimesecret.com/secret/$secret
}
Output looks simlar to this
george@george-LT:~$ onetimesecret Thisissupersecret
https://onetimesecret.com/secret/kvq9927e3ylltd83u679vlyfr942vjg
I found this very useful as I use it daily, and I can pipe it into any other cli messaging app (eg into slackcat)