A secure, customizable password generator CLI tool written in Go with clean architecture.
____ ____ _______________ ____ ____
/ __ \/ __ `/ ___/ ___/ __ `/ _ \/ __ \
/ /_/ / /_/ (__ |__ ) /_/ / __/ / / /
/ .___/\__,_/____/____/\__, /\___/_/ /_/
/_/ /____/
passgen v1.1.0
Cryptographically secure password generation
- π Secure Random Generation β Uses
crypto/randfor cryptographically secure randomness - π¨ Customizable Character Sets β Lowercase, uppercase, numbers, symbols (toggle individually)
- π No-Repeat Mode β
--no-repeatflag guarantees no duplicate characters with full type coverage - π― Word-Based Passwords β Transform memorable words into secure passwords (6 strategies, 3 complexity levels)
- π Password Strength Checker β Analyze strength and get improvement suggestions
- π Preset Configurations β Quick presets: secure, simple, pin, alphanumeric
- π¦ Batch Generation β Generate multiple unique passwords at once
- π Cross-Platform β Linux, macOS, Windows
curl -sSL https://raw.githubusercontent.com/kumarasakti/passgen/main/install.sh | bashgo install github.com/kumarasakti/passgen@latestAfter
go install, add Go's bin to PATH:export PATH=$PATH:$(go env GOPATH)/bin
irm https://raw.githubusercontent.com/kumarasakti/passgen/main/install.ps1 | iexgit clone https://github.com/kumarasakti/passgen.git
cd passgen
make build
sudo mv build/passgen /usr/local/bin/Download from the releases page.
passgen --version
passgen --helppassgen # Default 14-char password (lower, upper, symbols)
passgen -l 16 -n # 16 chars with numbers
passgen --secure # All character types enabled
passgen -c 5 # Generate 5 passwordspassgen --no-repeat -l 20 --secure # No duplicate characters
passgen --exclude-similar # Exclude i, l, 1, L, o, 0, O
passgen --exclude "aeiou" # Exclude specific characters
passgen --lower=false --upper=false -n -l 6 # PIN (numbers only)
passgen --alphanumeric -l 12 # Letters and numbers onlypassgen word "security" # Default hybrid transformation
passgen word "sunshine" --strategy leetspeak # s3cur1ty style
passgen word "secret" --complexity high # Maximum complexity
passgen word "team" --count 3 # 3 variationsStrategies: leetspeak Β· mixedcase Β· suffix Β· prefix Β· insert Β· hybrid (default)
Complexity: low Β· medium (default) Β· high
passgen preset secure # 16 chars, all types
passgen preset simple # 12 chars, letters + numbers
passgen preset pin # 6 digits
passgen preset alphanumeric # 12 chars, letters + numberspassgen check "mypassword123"| Flag | Short | Description | Default |
|---|---|---|---|
--length |
-l |
Password length | 14 |
--count |
-c |
Number of passwords to generate | 1 |
--lower |
Include lowercase letters | true | |
--upper |
Include uppercase letters | true | |
--numbers |
-n |
Include numbers | false |
--symbols |
-s |
Include symbols | true |
--no-repeat |
Avoid duplicate characters (guaranteed type coverage) | false | |
--exclude-similar |
Exclude similar characters (il1Lo0O) | false | |
--exclude |
Characters to exclude | "" | |
--secure |
-S |
Enable all character types | false |
--simple |
-m |
Letters + numbers only | false |
--alphanumeric |
-a |
Alphanumeric only | false |
--help |
-h |
Show help | |
--version |
-v |
Show version |
passgen word <word> [flags]| Flag | Short | Description | Default | Options |
|---|---|---|---|---|
--strategy |
-s |
Transformation strategy | hybrid | leetspeak, mixedcase, suffix, prefix, insert, hybrid |
--complexity |
-x |
Complexity level | medium | low, medium, high |
--count |
-c |
Number of variations | 1 |
$ passgen
π― Your Password:
ββββββββββββββββββ
β U$DD$fico*Q,.Y β
ββββββββββββββββββ
π Length: 14 | Character types: Lowercase, Uppercase, Symbols | Strength: Very Strong πͺ
π Security info: 88.0 bits entropy, cracks in 4892016 years
π¬ Someone's taking this security thing seriously! π
$ passgen --secure -l 20 --no-repeat
π― Your Password:
ββββββββββββββββββββββββ
β dP$<c1Xk6.q9!jLv7bRz β
ββββββββββββββββββββββββ
π Length: 20 | Character types: Lowercase, Uppercase, Numbers, Symbols | Strength: Extremely Strong π₯
π Security info: 101.3 bits entropy, cracks in 5.4e+19 years
π¬ Brr, that's ice cold security! Even hackers are shivering! π₯Άmake deps # Install dependencies
make build # Build for current platform
make build-all # Build for all platforms
make test # Run all tests
make dev # Format, lint, test, build
make release # Create release archivesThis tool uses Go's crypto/rand package for cryptographically secure random number generation. Generated passwords are suitable for production use.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License β see LICENSE for details.
- Word-Based Password Generation β 6 transformation strategies, 3 complexity levels
- No-Repeat Mode β
--no-repeatflag for no-duplicate passwords with guaranteed type coverage - Batch Uniqueness β
GenerateMultiplePasswordsretries on collisions - BuildCategories β Per-category charset support for guaranteed character type coverage
- Fisher-Yates Shuffle β Cryptographically secure shuffle for no-repeat mode
- Clean Architecture β Domain-Driven Design with domain/application/infrastructure layers
- Comprehensive Testing β 30+ test cases across all architectural layers
- Fully backward compatible
- Initial release
- Basic password generation with customizable options
- Password strength checker
- Preset configurations
- Cross-platform support