Utility for avoiding having password/tokens ending up in your output and shell history
People commonly have various of tokens and passwords locally stored in their shell history and sometimes in log outputs. This utility gives you a way to avoid that by combining 1Password's password store with a simply CLI tool for getting passwords and filtering output.
Install 1Password's CLI client op
first.
eval $(op signin <subdomain>)
$ sp g GitHub
ThisIsMyVerySecretPassword
$ sp g GitHub | sp f GitHub
**************************
$ export TOKEN=$(sp g GitHub)
$ echo "Hello, this is my token: $TOKEN. It's nice eh?" | sp f GitHub
Hello, this is my token: **************************. It's nice eh?
MIT 2018 - Victor Bjelkholm