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

ourpassgen-cli

v1.0.4

Published

A CLI tool to generate secure random passwords and copy them to clipboard

Readme

OurPassGen CLI

A secure, customizable password generator CLI tool that generates random passwords and automatically copies them to your clipboard.

Features

  • 🔐 Cryptographically secure password generation using Node.js crypto module
  • 📋 Automatic clipboard copying for instant use
  • ⚙️ Highly customizable with various options and presets
  • 🚀 Easy to use with simple commands and sensible defaults
  • 🎯 Multiple presets for different use cases (simple, strong, PIN)
  • 🔧 Flexible character sets with inclusion/exclusion options

Installation

Global Installation

npm install -g ourpassgen-cli

Using npx (No Installation Required)

npx ourpassgen-cli

Usage

Basic Usage

Generate a default 16-character password and copy to clipboard:

ourpassgen
# or
npx ourpassgen-cli

Command Options

ourpassgen [options] [command]

Options

  • -l, --length <number> - Password length (default: 16)
  • --no-lowercase - Exclude lowercase letters
  • --no-uppercase - Exclude uppercase letters
  • --no-numbers - Exclude numbers
  • --no-symbols - Exclude symbols (!@#$%^&*()_+-=[]{}|;:,.<>?)
  • -x, --exclude-ambiguous - Exclude ambiguous characters (il1Lo0O)
  • --no-copy - Don't copy to clipboard, just display
  • -h, --help - Display help information
  • -V, --version - Display version number

Examples

# Generate a 12-character password (includes symbols by default)
ourpassgen -l 12

# Generate a password without symbols
ourpassgen --no-symbols

# Generate a password without ambiguous characters
ourpassgen -x

# Generate a password and display it (don't copy to clipboard)
ourpassgen --no-copy

# Generate a password with only lowercase and numbers
ourpassgen --no-uppercase --no-symbols

Preset Commands

Simple Password

Generate a simple password with letters, numbers, and symbols (no ambiguous characters):

ourpassgen simple
ourpassgen simple -l 10  # Custom length
ourpassgen simple --no-clipboard  # Don't copy to clipboard

Strong Password

Generate a strong password with all character types (default: 20 characters):

ourpassgen strong
ourpassgen strong -l 24  # Custom length (default: 20)
ourpassgen strong --no-clipboard  # Don't copy to clipboard

PIN Generation

Generate a numeric PIN (default: 6 digits):

ourpassgen pin
ourpassgen pin -l 4   # 4-digit PIN
ourpassgen pin -l 8   # 8-digit PIN
ourpassgen pin --no-clipboard  # Don't copy to clipboard

Library Usage

You can also use this package as a library in your Node.js or React/Next.js applications.

Installation

npm install ourpassgen-cli

Basic Usage

import { generatePassword } from 'ourpassgen-cli';

// Generate a default password (16 chars, letters/numbers/symbols)
const password = generatePassword({ length: 16 });
console.log(password);

Advanced Usage

import { generatePassword } from 'ourpassgen-cli';

const password = generatePassword({
  length: 24,
  includeLowercase: true,
  includeUppercase: true,
  includeNumbers: true,
  includeSymbols: true,
  excludeAmbiguous: true // Exclude 'i', 'l', '1', 'L', 'o', '0', 'O'
});

It uses crypto.randomBytes in Node.js and window.crypto.getRandomValues in browsers to ensuring cryptographically secure generation in both environments.

Character Sets

  • Lowercase: abcdefghijklmnopqrstuvwxyz
  • Uppercase: ABCDEFGHIJKLMNOPQRSTUVWXYZ
  • Numbers: 0123456789
  • Symbols: !@#$%^&*()_+-=[]{}|;:,.<>?
  • Ambiguous: il1Lo0O (excluded when using -x flag)

Security

This tool uses Node.js's built-in crypto.getRandomValues() function to ensure cryptographically secure random number generation. This makes the generated passwords suitable for security-sensitive applications.

Requirements

  • Node.js 14.0.0 or higher

Development

Local Development

  1. Clone the repository
  2. Install dependencies: npm install
  3. Link for local testing: npm link
  4. Test the CLI: ourpassgen --help

Project Structure

ourpassgen-cli/
├── bin/
│   └── passgen.js      # Main CLI script
├── package.json        # Package configuration
└── README.md          # Documentation

License

MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Changelog

v1.0.0

  • Initial release
  • Basic password generation with customizable options
  • Clipboard integration
  • Preset commands (simple, strong, pin)
  • Comprehensive CLI interface