Skip to main content
Oct 2, 2023 7:46 PM UTC
Question

CLI Search for Username

I'm trying to setup automation to fetch and save passwords to 1Password, however, I don't seem to see any way to find an Item by username other than to individually query each item in the list. I expected to be able to use the list function, but it doesn't return the username, only the title, so its not useful. Is there a proper way to find an Item by username?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided

3 replies

Oct 5, 2023 2:42 PM UTC

Try JSON format, i.e. op item list --format json, username should be tied to "additional_information".

Oct 9, 2023 3:20 PM UTC

The package I was using didn't expose that property. I've now switched to using Connect as its much faster, and will work better for what we need anyway.

Nov 15, 2023 5:21 PM UTC

op item list --format json takes ~12 seconds to run (returning ~1200 items), which is annoyingly long in an interactive context.

I would love to be able to type op item search "whatever" and have it return the same results as a GUI search for "whatever".