node-onepass-util
v1.0.1
Published
1Password utils
Readme
node-onepass-util
A simple Node.js wrapper for the 1Password CLI (op) to retrieve secrets.
Prerequisites
- 1Password CLI installed and authenticated.
Installation
npm install node-onepass-utilUsage
import { getTokenSync } from "node-onepass-util";
try {
const token = getTokenSync("my-secret-item-name-or-id");
console.log(token);
} catch (error) {
console.error("failed to retrieve token:", error);
}