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

keyval

v2.1.2

Published

A simple keyval db

Downloads

69

Readme

keyval

A small command-line helper for storing and retrieving key–value pairs through the keyval.org API.

Requirements

  • Node.js (recommended: current LTS or newer)

Running the CLI

You can run keyval CLI in two ways.

1. Recommended: npx (no install)

This is the recommended approach: use npx so you do not install a global module. npm fetches and runs the CLI when you need it.

Set a value

npx keyval set <key> <value>

Get a value

npx keyval get <key>

Example (suggest using a key at least 10 characters long):

npx keyval set my-10-plus-char-key "hello world"
npx keyval get my-10-plus-char-key

2. Global install (Other Option)

Install the package once, then run keyval directly (no npx):

npm i -g keyval

keyval set <key> <value>
keyval get <key>

The CLI prints a success summary for set, and prints the stored value line for get. If something goes wrong, you’ll see an error message on stderr and a non-zero exit code.

If npx keyval does not work

Caching, an unpublished local version, or an older npm can sometimes give you stale or unexpected behavior. Pin the registry package explicitly:

npx keyval@latest set <key> <value>
npx keyval@latest get <key>

Learn more

Module usage

This package exposes default { set, get } from index.js, so you can also import kv from 'keyval' in your own Node projects when you depend on keyval as an npm dependency.

npm install keyval

----

import kv from "keyval";

const s = await kv.set("hello-from-keyval-org", "hello-there");
const v = await kv.get("hello-from-keyval-org");
console.log(v);

OR

async function main() {
  const s = await kv.set("hello-from-keyval-org", "hello-there");
  const v = await kv.get("hello-from-keyval-org");
  console.log(v);
}
main();

Please open a ticket for any bugs or updates at https://github.com/prakis/keyval/issues