this post was submitted on 13 Nov 2024
26 points (100.0% liked)
Open Source
31220 readers
279 users here now
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Useful Links
- Open Source Initiative
- Free Software Foundation
- Electronic Frontier Foundation
- Software Freedom Conservancy
- It's FOSS
- Android FOSS Apps Megathread
Rules
- Posts must be relevant to the open source ideology
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon from opensource.org, but we are not affiliated with them.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Assuming you had the secrets stored in a secrets.json file in your home directory in this format:
You could make a simple
otp.py
script and basic TOTP library to generate them in a script & copy them to clipboard:Then you just
alias otp='f() { $HOME/otp.py $1 };f'
in your shell profile/rc and call it with e.g.otp some_other_account
or justotp
if you forget what key names you gave them to get a reminder list. Obviously you'd want to replace the JSON plaintext file load with an actual secret store if you're not a lazy madman. I am a lazy madman.Edit: when I stop being lazy I will probably switch to that [email protected] suggestion below (pass + pass-otp extension).