devkits-password-generator
v1.0.3
Published
Generate cryptographically secure passwords — strong, random, customizable
Maintainers
Readme
devkits-password-generator
Generate cryptographically secure passwords from the command line. Strong, random, customizable.
Install
npm install -g devkits-password-generatorUsage
CLI
# Generate a 16-character password
pwdgen
# Custom length
pwdgen -l 32
# Generate 5 passwords
pwdgen -c 5
# Only lowercase + numbers
pwdgen -L -S
# Exclude similar characters (0, O, o, I, l, 1)
pwdgen -e
# Short memorable password
pwdgen -l 8 -u -n -SProgrammatic API
const { generatePassword, getCharset, calculateEntropy } = require('devkits-password-generator');
// Generate a 20-char password
const pwd = generatePassword(20);
// Custom charset
const charset = getCharset({ uppercase: true, lowercase: true, numbers: true });
const pwd = generatePassword(16, charset);
// Calculate entropy
const entropy = calculateEntropy(16, 62); // ~95 bitsOptions
| Option | Alias | Default | Description |
|--------|-------|---------|-------------|
| --length | -l | 16 | Password length |
| --uppercase | -u | true | Include A-Z |
| --no-uppercase | -L | - | Exclude uppercase |
| --numbers | -n | true | Include 0-9 |
| --no-numbers | -N | - | Exclude numbers |
| --symbols | -s | true | Include symbols |
| --no-symbols | -S | - | Exclude symbols |
| --exclude-similar | -e | false | Exclude 0OoIl1 |
| --count | -c | 1 | Number of passwords |
Security Features
- Cryptographically secure — Uses Node.js
crypto.randomBytes() - High entropy — Default 16-char with full charset = ~104 bits
- No external dependencies — Zero supply chain risk
- Client-side only — Passwords never leave your machine
- No logging — Generated passwords are not stored anywhere
Password Strength Guide
| Entropy | Rating | Use Case | |---------|--------|----------| | < 28 bits | Very Weak | Not recommended | | 28-36 bits | Weak | Low-security only | | 36-60 bits | Fair | Basic accounts | | 60-80 bits | Strong | Important accounts | | 80+ bits | Very Strong | Critical accounts |
Recommendations:
- Minimum 16 characters for important accounts
- Use unique passwords for each service
- Consider a password manager for storage
- Enable 2FA wherever possible
Related Tools
🔍 Build something amazing? Check out API Monitor — simple, affordable API monitoring for indie hackers. Get alerted before your customers notice. Just $9/mo.
See Also
- DevKits — All 82 free developer tools in one place
- JSON Formatter — Format and validate JSON
- Base64 Encoder — Encode/decode Base64
- JWT Decoder — Decode JWT tokens
- UUID Generator — Generate UUIDs
- Hash Generator — Create MD5, SHA1, SHA256 hashes
- CSS Tools — CSS minifier, formatter, validator
- HTML Tools — HTML formatter, minifier
- URL Tools — URL encode/decode, parse
- Color Converter — Convert HEX, RGB, HSL colors
- Regex Tester — Test and debug regular expressions
Support DevKits
If you find this tool useful, please consider supporting the project:
Open Collective
Become a sponsor: Open Collective - DevKits
Crypto Donations
Prefer crypto? We accept:
- ETH (Ethereum):
0xDea4a6A20fCB44467e45Ef378972F54B22dC59db - USDC (ERC-20):
0xDea4a6A20fCB44467e45Ef378972F54B22dC59db
Donation Perks:
- $5+ — Supporter Badge
- $10+ — Pro Access (1 month)
- $29+ — Pro Access (1 year)
- $100+ — Lifetime Pro + Priority Support
After donating, email your transaction hash to [email protected] to claim perks.
License
MIT — DevKits Team
