1Password CLI wrapper.
- Node.js >= 6
esm
loader- Official 1Password
op
CLI op signin
with exported session token
$ yarn add 1pwd
# or
$ npm install 1pwd
op --help
(commands: string[], options?: {}) => Promise<string>
import { op } from '1pwd'
const result = await op(['list', 'vaults'])
// unparsed stdout as is
op get item --help
(item: string, options?: {}) => Promise<{}>
import { getItem } from '1pwd'
const result = await getItem('item', {
vault: 'vault',
includeTrash: true
})
// parsed JSON
op get totp --help
(item: string) => Promise<string>
import { getTotp } from '1pwd'
const result = await getTotp('item')
// string
- check for session token and handle
op signin
- wrap more
op
CLI commands