How to pipe bitwarden cli with a command that require a password?

I was wondering if it’s possible to pipe a command that prompts for a password (eg: connecting to a Mysql instance) with bitwarden cli so that I don’t have to open bitwarden extension, copy the password and paste it.

Thank you!

I’e been trying to do this, managed to get something working for authentication to my work kerberos.

echo $(bw get password "Work IDP") | kinit [email protected]

However for another case when I’m trying to authenticate to my work VPN I can’t get it to work:

echo $(bw get password "Work VPN") | \
  sudo /usr/sbin/openconnect <options> vpn.hostname --passwd-on-stdin

it just hangs as if it’s waiting for the password, I wonder if the sudo is interfering with the pipe?