New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ourpassgen-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ourpassgen-cli

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

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

  • Clone the repository
  • Install dependencies: npm install
  • Link for local testing: npm link
  • 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

Keywords

password

FAQs

Package last updated on 14 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts