Forum Discussion
Former Member
2 years agoIf you have any specific use cases that this really doesn't solve, please feel free to let us know :)
Amanda
There are a few past threads about this:
\n- December 2020: https://1password.community/discussion/117673/generating-passwords-with-the-cli
\n- March 2022: https://1password.community/discussion/127625/feature-request-add-password-generation-with-words-in-cli
\n- May 2022: https://1password.community/discussion/129811/generate-passwords-from-op-1p-cli
They never seemed to go anywhere. One suggestion was to use:
\n
\nop item create --title='retrievable generated password' --category=password --generate-password=20,letters,digits | op read op://Private/'retrievable generated password'/password
\n
\nI find that overly verbose and complex just to get a short-lived password. There are many situations where you wouldn't want to save a password in 1P from a shell script. In my case, I'm spinning up containers to test with, after which I destroy the container and never need the password again.
There are plenty of other ways to do this with bash/zsh:
\n- date +%s | sha256sum | base64 | head -c 32 ; echo
\n- openssl rand -base64 32
I'd much prefer a way to do this with the 1Password CLI if at all possible. Something like op generate [options]
, though the command can be anything.
1Password Version: Not Provided
\nExtension Version: Not Provided
\nOS Version: Not Provided
\nBrowser:_ Not Provided