1password.js
1password.js
is a library to process 1password Vaults.
Installation
You can install via npm:
> npm install 1password-js
Usage
1password.js
exposes a class that is instantiated with the vault master password and optionally, the profile name, and can be searched with the search
method:
const Vault = require('1password-js');
const vault = new Vault(masterPassword);
const vault = new Vault(masterPassword, 'my-special-profile');
vault.search('Github').then(items => {
const password = items[0].itemDetail.fields.find(field => field.designation === 'password').value;
}).catch(() => {
})
Notes
This only currently works on Mac. If you have the location of the vault sqlite database on other systems, create an issue and I'll add it!
License
MIT