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 🙏

© 2025 – Pkg Stats / Ryan Hefner

secrets-out

v0.1.0

Published

secrets management for apps

Readme

secrets-out

Seacrest Out!

secrets-out is a command-line utility used to securely manage encrypted files and settings in your projects. It allows you to commit encrypted information into a repository such as git/github so that it remain alongside the project's code base while also helping to ensure that the original unencrypted information is not exposed.

Inspired by Rails' Encrypted Secrets and the sekrets gem.

Getting Started

Install

Requires Node.js and NPM

> npm install -g secrets-out

Incorporating into your Project

secrets-out relies upon your project's manifest (package.json) for configuration and must be executed from the same directory as your package.json file.

To add secrets-out to an existing application simply run the command secrets-install and the utility will take care of the following:

  1. add a 'secrets-out' configuration file to package.json
  2. create a secrets.key file to store your master encryption key locally
  3. add secrets.key to your .gitignore so that it is not commited to your repo (and potentially exposed)

After running secrets-install we must set our master key in the secrets.key file. If you would like to have a strong key generated for you, just run secrets-generate and secrets-out will add a random 32-bit key to your key file.

Finally, we need to configure secrets-out to indentify the files that you would like to have encrypted. This can be easily accomplished by adding a list of files (by name or GLOB) to the files attribute as demonstrated below

  "secrets-out": {
    "files": [
      "config/secrets.yml",
      "config/*secrets.config",
      "*secrets.config"
    ]
  }

Encrypting Secrets

Once configured we can now encrypt our files. By running the command secrets-encrypt, secrets-out will locate all files matching the configured files patterns and perform the following:

  1. Encrypt the file using [node-cipher] using the configured master key. Each file's encrypted counterpart shall have the same filename with a .enc extension added
  2. Check the project's .gitignore file and add the unencrypted source filename if not present. This shall ensure the source file is not committed to git/github. (existing projects may require steps to manually remove files that were previously committed to the repo)

Decrypting Secrets

Decrypting is just as simple. Run the command secrets-decrypt and any matching files (.enc counterpart) shall be decrypted using the master key.

Master Key

secrets-out requires a master key to encrypt and decrypt files. This key can be provided to secrets-out using one of 3 different strategies

  1. A secrets.key file located in the project's root folder containing only the key (no line breaks or other characters). This is recommended for local development.
  2. A command-line argument using the pattern secrets-encrypt key=your_master_key_here. This approach can be useful in transient environments such as build servers.
  3. An environment variable as designated by the key attribute in your secrets-out configuration. For example, if we would like to use an environment variable named SOME_MASTER_KEY we simply update the project's package.json to include the attribute "key": "SOME_MASTER_KEY" and secrets-out will attempt to use this value to encrypt/decrypt.