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 🙏

© 2024 – Pkg Stats / Ryan Hefner

keepy-cli

v1.4.0

Published

A CLI tool to save encripted KEY=VALUE pairs.

Downloads

120

Readme

keepy-cli

Coverage Status install size Build Status

A CLI tool to save encrypted KEY=VALUE pairs in file that you can store securely in your repository.

If you are tired to store elsewhere your env keys, now you can save them where you want! Like npm init, keepy init will create a keepy-store.json where it store all the keys encrypted with the aes-256-gcm algorithm: all you need is a single password! This is a file that you can store directly in the repository, in a secure hard drive or share via email: it's just a secure file of which only you have control and ownership.

Some sugar feature to add tags to the keys and restore the file, and you are ready to play with your token without losing them in your multiple PC or dev's environments!

Install

To use this tool you need at least Node.js 10.5.0 because it uses crypto.scryptSync: only standard lib to crypt your keys.

NPM

npm i keepy-cli -g

If you install keepy-cli globally, you can use it in your command line via keepy (without the -cli).

NPX

Of course, you can use keepy-cli via npx. You have only to change the commands from keepy <command> ➡️ to npx keepy-cli <command>

Features

Check the man directory to see all the arguments detail or type npx keepy-cli help to get a preview.

Init

keepy init [--yes|-Y]
           [--overwrite|-F]
           [--password|-w <string>]
           [--help|-h]

Creates a keepy-store.json where all the protected keys will be saved. The file will be create in the current directory.

Add

keepy add [--key|-k <string>]
          [--payload|-p <string>]
          [--file|-f <file path>]
          [--env|-e]
          [--update|-u]
          [--tags|-t <string 1> <string 2> <string n>]
          [--help|-h]

This command adds one key to the keepy-store.json. If you set a file, all the keys will be added with the input tags. The file can be either .env (K=V) or a .json file. If you import from a JSON file the first-level keys will be the keys you have in the store at the end. If you set all the args payload, env, file, they will be evaluated in this order without overwriting.

Restore

keepy restore [--stout|-s]
              [--showtag|-g]
              [--colored|-c]
              [--env|-e]
              [--key|-k <string>]
              [--tag|-t <string>]
              [--file|-f <file>]
              [--overwrite|-F]
              [--password|-w <string>]
              [--help|-h]

Restore the desired keys stored in keepy-store.json to:

  • stout
  • environment variable
  • K=V file If you set multiple output, all will be executed because they are independent.

Delete

keepy delete [--env|-e]
             [--key|-k <string>]
             [--tag|-t <string>]
             [--password|-w <string>]
             [--help|-h]

Delete the desired key from the keepy-store.json.

Help

keepy -h

This is a keepy-store.json example:

{
  "meta": {
    "version": "1.0.0",
    "secured": true,
    "hint": "Say hi in italian.."
  },
  "secure": {
    "salt": "nWs2oqgGZ3CTxa6lI1MuxaVm4ONLqYROMSsruyJ1buE=",
    "verify": "WfaOAnvYI+hCRlnJzn1E+OnXTOY9XdafHFIyGu6kxlPgXWqdQ7B2IX4kP5v0eAyGz/+1GmvDXdrE8QSkOKaNT+DqrtPq5NN74W9QV+KtHSjStL3Nyy0="
  },
  "data": [
    {
      "key": "7rR9aPIkfXedJQ072PpJNXWirn2RNMxkpAcPGx71/3z+cBtHi03T916OGu33dUo3pNz83oL/3TLFGqtBkEQK7j1lGzlShRNTFpu3uXIF90K1",
      "payload": "5WrTzsRiWPg08tmBIqcToX7gKZs0dKpjZmlK03lqHE8tTVIMA+yI1dty4zUv8Tp7kPXYEJzj7S+LGJ+AVp4fWHT/2QhKEC7Aw43TInIRrBXz",
      "tags": [
        "7T6aoF7qdPyJkDqon3+w/NGprabn4FnzN6sdSS33AvJcJOYWwSvEXj2Tq2TcecpS2xB6oQZk4A9f6yj5dL6+foBVsuTk4Fu65+j3/uTbujfbhw==",
        "7fTUENiDEFEWSglpDwsoyB5RdmimgVXGeDabkUfaOtM/QlOps0mNgV+bkvQ10g6KfFuGTCtUdse2qu1ubX119eeQHzjq6ybYBZ3NsIYoIug9HA=="
      ]
    }
  ]
}

Architecture

This cli architecture has been inspired by fastify-cli

Test

For run the tests simply execute:

npm test

License

Copyright Manuel Spigolon, Licensed under MIT.