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
Former Member
3 years agoHow to add multiple URLs via CLI?
Hello there,
our test servers all require the same login credentials. In the past, I solved that problem by manually creating a login item in 1password,
export that, have a script add hundreds o...
Former Member
3 years agoThanks, that sounds like good approach.
I solved it differently in the meantime. My code:
- fetches the Login template as JSON
- fetches the required credentials from some existing item
- adds things such as user name and password, and most important: a field "urls" that contains an array of JSON objects { "href": "someip"}
- and then passes that via stdin to op create
This way, I can programmatically create the required login items.
Then there is another script that updates these auto-created items (they all share a specific tag).
The update is a little bit deficient, as that only works with open item edit password=....
, but that is acceptable
(albeit I might update the tooling once op item edit
supports to pass arguments via STDIN, too)