Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Nezteb
2 years agoNew Contributor
Feature Request: Generate random passwords with CLI via dedicated command (e.g. `op generate`)
There are a few past threads about this:
- December 2020: https://1password.community/discussion/117673/generating-passwords-with-the-cli
- March 2022: https://1password.community/discussion/1276...
Former Member
2 years agoExample use case:
Take the temporary generated password and use it to override a database (non password/login item) password
PASS=$(op item create \
--dry-run \
--category Password \
--generate-password='letters,digits,symbols,32' \
--format json \
| jq -r '.fields[] | select(.id == "password").value');
op item get "EXISTING DATABASE ITEM" --format json \
| op item create \
--vault "VAULT" \
--title "NEW NAME" \
- 'username=USER' 'database=DB' "password=${PASS}"