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

random-words-local

v1.1.0

Published

Generate secure, memorable random word passphrases from a 275,000+ word English dictionary. Perfect for creating strong passwords, passphrases, mnemonic phrases, and diceware-style wordlists. CLI tool with cryptographically secure random generation.

Readme

Random Words CLI - Passphrase Generator

Generate secure, memorable random word passphrases from a 275,000+ word English dictionary.

This CLI tool uses cryptographically secure random numbers (crypto.randomInt) to generate strong, easy-to-remember passphrases perfect for passwords, SSH keys, seed phrases, and security-sensitive applications. Based on the famous XKCD "correct horse battery staple" concept and Diceware method.

Why Random Word Passphrases?

Passphrases generated by this tool are:

  • More secure than random character passwords (higher entropy)
  • Easier to remember than complex symbol-laden passwords
  • Resistant to brute force attacks due to massive keyspace
  • Human-friendly for typing and memorization

With 4 words from a ~275,000 word dictionary: ~72 bits of entropy ($4 \times \log_2(275,000)$)

Installation

Run directly with npx (no installation required):

npx random-words-local

Or install globally for convenient CLI access:

npm install -g random-words-local

This package now exposes both random-words-local and random-words as CLI commands, so either of these will work after install:

random-words-local
random-words

Usage

random-words-local [options]

Options

| Option | Description | Default | | :----------------------- | :--------------------------------------------- | :------- | | -n, --count <number> | Number of words to generate | 4 | | -s, --separator <char> | Separator between words | - | | -f, --format <type> | Output format: joined, array, or newline | joined | | -h, --help | Show help message | |

Examples

Generate a passphrase (default: 4 words)

random-words
# Output: correct-horse-battery-staple

Generate a stronger passphrase with 6 words

random-words -n 6
# Output: audible-receipt-walnut-tangible-symphony-leverage

Use spaces instead of dashes for readability

random-words -n 5 -s " "
# Output: lightning fortress orchestra pioneer cobalt

Generate a passphrase for password managers

random-words -n 4 -s ""
# Output: mushroom.jellyfish.umbrella.pavement

Output as JSON array for scripts

random-words -n 3 -f array
# Output: ["horizon","architect","melody"]

One word per line for batch processing

random-words -n 5 -f newline
# horizon
# architect
# melody
# fortress
# lightning

Use in scripts with custom separator

random-words -n 8 -s "_"
# Output: purple_tiger_midnight_lighthouse_falcon_sunset_azure_kitchen

Use Cases

  • Password managers - Generate master passwords or secure notes
  • SSH keys - Create memorable passphrase for private keys
  • Two-factor authentication - Backup codes or recovery phrases
  • Cryptocurrency - Seed phrases and wallet recovery
  • API keys - Secure tokens for development
  • VPN passwords - Strong, memorable credentials

Security

This tool uses Node.js crypto.randomInt() for cryptographically secure random number generation. Unlike pseudo-random generators, crypto.randomInt is suitable for security-sensitive applications.

The entropy calculation:

  • 1 word from 275,000 words ≈ 18 bits
  • 4 words ≈ 72 bits
  • 6 words ≈ 108 bits
  • 8 words ≈ 144 bits

For comparison, a typical 12-character alphanumeric password has ~60 bits of entropy.

Related Projects

License

MIT