This repository contains a Node script for setting and getting a secret value from the macOS KeyChain.
git submodule add https://github.com/tomashubelbauer/node-keychain
npm i tomashubelbauer/node-keychain
await setSecret('account', 'service', 'password');
This method will fail if the secret is already set.
const secret = await getSecret('account', 'service');