# 1password-js

> 1Password Vault Handling in Javascript

Latest version **1.0.0** (published 2016-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install 1password-js
pnpm add 1password-js
yarn add 1password-js
bun add 1password-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-08-15 |
| First published | 2016-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joshua Smock |
| Maintainers | joshuasmock |

## Links

- npm: https://www.npmjs.com/package/1password-js
- Repository: https://github.com/jo-sm/1password.js
- Homepage: https://github.com/jo-sm/1password.js#readme
- Issues: https://github.com/jo-sm/1password.js/issues
- npm.io page: https://npm.io/package/1password-js

## Dependencies (1)

- [sqlite3](https://npm.io/package/sqlite3.md) ^3.1.4

## Recent versions

- 1.0.0 (latest) — 2016-08-15

## README

# 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:

```js
const Vault = require('1password-js');

// Somehow we get the master password...

const vault = new Vault(masterPassword);

// Or, supplying a profile name:

const vault = new Vault(masterPassword, 'my-special-profile');

// Searching in the Vault
// `.search` return a Promise that will resolve to the item detail(s)
// or reject
vault.search('Github').then(items => {
	// The search may have multiple entries
	const password = items[0].itemDetail.fields.find(field => field.designation === 'password').value;
}).catch(() => {
	// There wasn't anything found with that title
})
```

## 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

---
_Source: https://npm.io/package/1password-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
