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

smart-passphrase

v2.0.2

Published

Memorable, secure passphrase generator for web and Node.

Readme

Human-readable, secure password generator for developers and CLI usage.

smart-passphrase

A lightweight, secure, and memorable passphrase generator for Node.js and modern browsers. Built to work smoothly in React, Next.js, Vite, and plain Node projects.

Features

  • Memorable: Human‑readable passphrases that are easy to type and remember.
  • Secure: Uses cryptographically secure randomness (via crypto.getRandomValues).
  • Versatile: Works in React, Next.js, Vite, and Node 18+.
  • Premium CLI: Beautifully styled terminal output with colors and animations.
  • Clipboard Support: Copy passphrases instantly from the CLI.
  • Zero Dependencies (Core): Only adds dependencies for the CLI tool.
  • Fully Typed: Written in TypeScript with a complete API.

Install

npm install smart-passphrase

Quick Start (Terminal)

Generate a passphrase instantly with a premium experience:

npx smart-passphrase

Pro Tip (Copy to clipboard):

npx smart-passphrase copy
# or
npx smart-passphrase -c

Custom Strength:

npx smart-passphrase --strength ultra

Quick Start (Code)

import { generatePassphrase } from "smart-passphrase";

const passphrase = generatePassphrase();
console.log(passphrase);
// Output: SilentGOOSE^mark324

Example Output

The CLI provides a vibrant, gradient-colored output that stands out!

API

generatePassphrase(options?)

Generate a secure, readable passphrase.

generatePassphrase({
  words: 3,
  numbers: { digits: 3 },
  symbols: true,
  uppercaseStyle: "random",
  separator: ""
});

generatePassword(options?)

Alias of generatePassphrase.

const password = generatePassword({ strength: "strong" });

entropyEstimate(options?)

Estimate entropy in bits based on your options.

const bits = entropyEstimate({ words: 4, symbols: true, numbers: true });

Options

words

Number of word tokens in the passphrase. Default is 3.

numbers

  • true (default): Adds digits.
  • { digits: number }: Controls the number of digits.
  • false: Removes digits.

symbols

  • true (default): Includes one random symbol.
  • string[]: Provide your own symbol list to pick from.
  • false: Removes symbols.

uppercaseStyle

Controls casing style for the words: "none" | "random" | "title" | "upper" | "lower"

strength

Preset security tiers that adjust words, symbols, and digits.

| Tier | Words | Symbols | Digits | Formatting | Approx. Entropy | | :--- | :--- | :--- | :--- | :--- | :--- | | easy | 3 | No | 2 | Title-Case-99 | ~30-35 bits | | medium | 3 | Yes | 3 | raNDomSYmb=123 | ~45-50 bits | | strong | 4 | Yes | 4 | rAndOMWordS#5432 | ~60-70 bits | | ultra | 5 | Yes | 5 | vErYStrONgWOrDs%12345 | ~80+ bits |

CLI Reference

Run npx smart-passphrase [command] [options] or install globally.

Commands

  • [default] - Generate a passphrase.
  • copy - Generate and copy to clipboard immediately.

Options

  • -w, --words <n> - Set the number of words (default: 3).
  • -s, --strength <tier> - Set tier (easy, medium, strong, ultra).
  • -c, --copy - Copy generated passphrase to clipboard.
  • -n, --numbers - Include numbers.
  • -N, --no-numbers - Disable numbers.
  • -S, --symbols - Include symbols.
  • -X, --no-symbols - Disable symbols.

Security Notes

  • Uses crypto.getRandomValues for strong randomness.
  • Requires Node 18+ or a modern browser runtime.

License

MIT