Bitwarden integrations - vault management api only accessible via bw cli

Has anyone been able to use the npm code step to import and run the bitwarden cli via:

npm install -g @bitwarden/cli

and then using import statements like:

import bw from ‘@bitwarden/cli’; //???
import { exec } from ‘child_process’;
import util from ‘util’;
import crypto from ‘crypto’;
const execAsync = util.promisify(exec);

I’m trying to develop a workflow step that adds a login item to a Bitwarden collection, using a serverless (azure) environment. If this is not possible, I’ll probably have to trigger an Azure HTTP function app via pipedream to pass variables that place a message in Azure Queue Storage, then use a CRON job in Cloud Shell that checks the queue at regular intervals for new messages. The Cloud Shell script would then execute the Bitwarden CLI commands in blob storage.

Obviously, this is a pretty convoluted process for what amounts to little gain. I’m hoping there is a simpler solution.

Any advice would be super appreciated!

Thanks in advance :slight_smile: