Skip to main content
Jun 9, 2025 5:05 AM UTC
Question

Search for CLI

Hi!

I'd like to request a feature: For the 1Password CLI (`op`) to support searching, just like the GUI client does.

My use case: I have about 30 or so entries that I would like to add a tag to. All entries belong to the same domain "home.mydomain.com" (many have subdomains on it). In the GUI client I type "home.mydomain.com" and they all come up.

I want to use a script using the `op` CLI to edit each, adding a tag to them. Right now the only method I can find is to first list all items and then retrieve each and do the search myself. That's very slow. It would be great if I could send a search them off and get back a list of results.

This could be as simple as `op item search "home.mydomain.com" --format=json` and then I could edit each of those items.

Thanks!

5 replies

Jun 9, 2025 6:38 AM UTC

Although it may not exist in OP - have you considered using the API service? You can throw together a simple api handler in Python.

GET /v1/vaults/{vault_id}/items?filter=title contains "bank"

GET /v1/vaults/{vault_id}/items?filter=title eq "Amazon" and category eq "LOGIN"

1P_SimonH
Community Manager
Community Manager
Jun 9, 2025 4:42 PM UTC

@jake thanks for sharing a potential workaround!

@flozza I've also added your suggestion as a feature request for consideration. Thanks for so clearly laying out your use case!

ref: PB-49237143

Jan 29, 2026 11:46 PM UTC

Too late for the op but maybe this is useful for someone else

If you have fzf installed, this one liner will search and then print the content

op item get (op item list | fzf --header-lines=1 | awk '{print $1}')

 

thecatfix
Feb 4, 2026 5:54 AM UTC
op item get $(op item list | fzf --header-lines=1 | awk '{print $1}')

This is AWESOME 

thecatfix
Feb 4, 2026 5:58 AM UTC
op item get $(op item list --format json | jq -r '.[] | "\(.id) \(.title) [\(.vault.name)]"' | fzf | awk '{print $1}')

For a cleaner selection interface that includes the Vault name and avoids parsing whitespace columns, use jq to format the entry before passing it to fzf.