Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.04 KB

README.md

File metadata and controls

43 lines (30 loc) · 1.04 KB

Shroud

standard code style

A module for encrypting and decrypting secrets with a master password, and managing them in a file-based vault.

Usage

const opts = {
  dataDir: '/usr/shroudData', // optional, default HOME_DIR/.shroud
  masterPassword: 'astrongmasterpassword' // required if not initialized
}

// initialize shroud
const shroud = require('shroud')(opts)

// add a secret to the vault
shroud.add({name: 'sekrit.com', secret: 'sekrit'})

// add a secret with a category
shroud.add({name: 'sekrit.com', secret: 'sekrit', category: 'work'})

// decrypt a secret
shroud.reveal('sekrit.com', 'astrongmasterpassword')

// remove a secret
shroud.remove('sekrit.com')

// update a secret
shroud.update({name: 'sekrit.com', secret: 'newSekrit'})

// list all secrets
shroud.list()

// list all secrets by category()
shroud.list({category: 'work'})

// list secrets that match a pattern (case-insensitive)
shroud.list({pattern: 'SekRit'})