How do I get a password based on an email?

I don’t think the tagging works, when creating this topic/issue. This relates to the bitwarden cli

I have multiple github users and a command like bw get password returns More than one result was found. Try getting a specific object by id instead. The following objects were found: followed by the x amount of ids.

I would like to get a specific password from a specific username. How can I achieve this without guessing which id belongs to what username?

Hi Mikkel - I don’t know if there is a way to obtain the password directly when there are multiple items sharing the same URI unless you already know the specific item’s GUID (id) value.

So, you might have to script this. First, search for the item in the vault that you want and return a JSON object with the contents:
bw list items --search username --url

Next, use whatever scripting language you prefer (e.g., bash, Python) to extract the value for the item’s ‘id’ property.

And then pass that ID you extracted to the get password command:
bw get password <ID_Value>

Maybe someone else knows of a more eloquent way to do this? I would love to know also.