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

keepmesafe

v1.1.1

Published

Stop storing your private keys in plain text! Keep them secret and encrypted

Downloads

15

Readme

User Documentation for keepmesafe Package

keepmesafe is a command-line utility designed to securely manage and store private keys using ERC-2335 standards. It provides an interactive interface for adding, listing, deleting accounts, and managing encryption passwords.

npm

npm package

Quickstart

Get started quickly with these simple steps:

npm install -g keepmesafe  # Install keepmesafe globally
npx keepmesafe@latest      # Run keepmesafe

Getting Started

Installation

Install the package globally using:

npm install -g keepmesafe
yarn install -g keepmesafe
pnpm install -g keepmesafe

Using the Command-Line Interface

Encrypt and Store Your Private Key.

Run the command:

npx keepmesafe@latest
yarn keepmesafe@latest
pnpm keepmesafe@latest

You will be prompted to provide your private key, encryption password, and an account name.

Options:

  • -pk, --private-key [value]: Directly provide a private key.

  • -p, --password [value]: Specify a secret key for decryption.

  • -a, --account-name [value]: Provide an account name for the private key.

  • -d, --delete [value]: Delete a specified account.

  • -hmp, --hide-my-privates: Create a precommit git hook to prevent you from pushing API keys

  • -la, --accounts: List all accounts in the keystore.

Note: Encrypted keys are stored in ~/pancerna/keystore.json.

Storing and Managing Your Password with keepmesafe

How to Store the Password

Upon setup, you'll be prompted to insert an encryption password. A 32-character hexadecimal password is generated if you don't provide one.

Where to Store the Password

The encryption password will be stored in a .password file in the root directory where you run the tool.

Extra Security Tips

Backup your .password file. Maintain strict Access Control. Consider External Storage for the .password file. Note: The .password file is automatically added to .gitignore.

Using Functions in Your Code

Retrieving Encrypted Private Key

Use betterKey or betterKeyAsync to decrypt and retrieve your private key.

import { betterKey } from "keepmesafe";

const fetchKey = async () => {
  const key = await betterKey("accountName");
  // Output: decrypted key
};

fetchKey();

Convert your private key back to hexadecimal

const fetchKey = async () => {
  const key = await betterKey("accountName").toHex();
  // Output: hexadecimal key
};
fetchKey();

Contributions

We welcome contributions from the community! Please refer to our contributing guidelines for more information.

Maintainers

Changelog

V1.1.1: New command --hide-my-private to create git precommit hooks and prevent devs from pushing hard coded private keys.

V1.0.1: Inline options for key management. Automated .password file creation and .gitignore updates. For support or contribution, please refer to our GitHub Repository.

License This project is licensed under MIT.