Skip to main content
March 20, 2026
Solved

op read by category

  • March 20, 2026
  • 1 reply
  • 41 views

My bank entries live in 3 categories (Login, Credit Cards, Bank Accounts) by the same name.

Trying to read the (login) password:
op read "op://Personal/<Bank Name>/password"
I get a "More than one item matches..." error (of course).

I also tried something like:
op read "op://Personal/<Bank Name>/password" --category login
but it does not work.

Is the a way to qualify a read by category - something I overlook?
Thanks

 

 

 

Best answer by Michael_Mercuri

If you have multiple items in your 1Password vault with the same name, I think your choices are:

  1. Rename items to be unique (maybe difficult if you have MANY items with the same name)
  2. Use "secret reference" More here: 

    https://developer.1password.com/docs/cli/secret-references/

Regarding "secret references": in a nutshell you navigate to the password field (or whatever field you need) in 1Password App, then right click > copy secret reference. Then you have a unique identifier to use in the CLI directly to the field you need. 

1 reply

Michael_Mercuri
March 27, 2026

If you have multiple items in your 1Password vault with the same name, I think your choices are:

  1. Rename items to be unique (maybe difficult if you have MANY items with the same name)
  2. Use "secret reference" More here: 

    https://developer.1password.com/docs/cli/secret-references/

Regarding "secret references": in a nutshell you navigate to the password field (or whatever field you need) in 1Password App, then right click > copy secret reference. Then you have a unique identifier to use in the CLI directly to the field you need.