npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ibrahim-rahhal/simple-secrets-vault

v1.1.0

Published

A lightweight Node.js package for securely managing local secrets using AES-256 encryption.

Readme

Simple Local Secret Vault

@ibrahimrahhal/simple-secrets-vault is a lightweight Node.js package for securely managing secrets in a local environment. It uses AES-256-CTR encryption to store secrets in a .secrets.json file located in the user's home directory.

Warning: SecureVault is not intended for production use. For production environments, consider using more robust solutions like HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault.

Features

  • Set and encrypt secrets: Add secrets securely using AES-256 encryption.
  • Retrieve and decrypt secrets: Access stored secrets with a password.
  • Load secrets to environment variables: Import all or specific secrets directly into process.env.
  • Cross-platform support: Works on all platforms supported by Node.js.

Installation

Install the package via npm:

npm install @ibrahimrahhal/simple-secrets-vault

Usage

The package can be used through command-line commands. Below are the available commands:

Commands

set

Stores an encrypted secret.

local-vault set <key> <value>

<key>: The name of the secret. <value>: The secret value.

Example:

local-vault set API_KEY my-secret-key

get

Retrieves and decrypts a stored secret.

local-vault get <key>

<key>: The name of the secret.

Example:

local-vault get API_KEY

load

Loads all secrets into environment variables.

local-vault load

load-specific

Loads specific secrets into environment variables.

local-vault load-specific <keys>

<keys>: A comma-separated list of secret keys.

Example:

local-vault load-specific API_KEY,DB_PASSWORD

Password

For all commands, you will be prompted to enter a password used for encryption/decryption.

Notes

  • Ensure the .secrets.json file is kept secure, as it stores encrypted data.
  • Use a strong password for encryption to enhance security.

API

If you prefer programmatic usage, the package exposes the following methods:

  • setSecret(key, value, password): Encrypts and stores a secret.
  • getSecret(key, password): Retrieves and decrypts a secret.
  • loadSecretsToEnv(password): Loads all secrets into environment variables.
  • loadSpecificSecretsToEnv(keys, password): Loads specific secrets into environment variables.
  • encrypt(text, password): Encrypts a given text.
  • decrypt(text, password): Decrypts a given text.

Example

Here's an example of how to use the package programmatically:

const { setSecret, getSecret, loadSecretsToEnv } = require('@ibrahimrahhal/simple-secrets-vault');

// Set a secret
setSecret('API_KEY', 'my-secret-key', 'my-password');

// Get a secret
const apiKey = getSecret('API_KEY', 'my-password');
console.log(`API Key: ${apiKey}`);

// Load all secrets into environment variables
loadSecretsToEnv('my-password');
console.log(process.env.API_KEY);

Security

  • Secrets are encrypted using the AES-256-CTR algorithm.
  • Ensure the password used for encryption is stored securely and not hardcoded.

License

This package is licensed under the MIT License.