Skip to content

Instantly share code, notes, and snippets.

@d3vAdv3ntur3s
Created June 25, 2021 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d3vAdv3ntur3s/a710621aa412a0f3c865476362de1699 to your computer and use it in GitHub Desktop.
Save d3vAdv3ntur3s/a710621aa412a0f3c865476362de1699 to your computer and use it in GitHub Desktop.
1password setup + retrieval
# install for mac via brew
$ brew install --cask 1password-cli
# sign in via cmd line
# You will need your secret key generated see 1password website: https://support.1password.com/secret-key/
# followed by password
$ op signin subdomain.1password.com user@domain.com
# alias into bash_profile for ease sake
$ alias 1pws='eval $(op signin subdomain)'
# output your session to check active
$ echo $OP_SESSION_subdomain
# List items in a vault and parse readable using JQ
op list items --vault Private | jq
# Get username and password (use can use the vault entry ID or Name)
op get item NokoTime --vault Private --fields username,password | jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment