βοΈ This project is still under development and has not been released, and parts of it may still be incomplete or not work properly.
A secure, customizable command-line password generator built with Go. Generate strong passwords with flexible character sets, avoid character repetition, and even output QR codes for easy mobile transfer.
π€ Character Set Control: Include/exclude lowercase, uppercase, numbers, and symbols
π¨ Custom Character Sets: Define your own character pool
π Smart Repetition Avoidance: Prevent consecutive character repetition
π± QR Code Output: Generate ANSI UTF-8 QR codes for easy mobile scanning
π‘οΈ Cryptographically Secure: Uses secure random number generation
git clone https://github.com/amirhossein-fzl/passgen.git
cd passgen
go build -o passgen cmd/main.goGenerate a default 12-character password with lowercase, uppercase, and numbers:
passgenGenerate a 16-character password with all character types:
passgen -l 16 -Spassgen [options]
| Short | Long | Description | Default |
|---|---|---|---|
-l |
--length |
Password length | 12 |
-L |
--lowercase |
Include lowercase letters (a-z) | true |
-U |
--uppercase |
Include uppercase letters (A-Z) | true |
-N |
--numbers |
Include numbers (0-9) | true |
-S |
--symbols |
Include symbols (!@#$%^&* etc.) | false |
-C |
--custom |
Custom character set to use | "" |
-a |
--avoid-repeats |
Number of last characters that shouldn't repeat | 1 |
-q |
--qr |
Generate QR code output in ANSI UTF-8 format | false |
By default, PassGen includes:
- Lowercase:
abcdefghijklmnopqrstuvwxyz - Uppercase:
ABCDEFGHIJKLMNOPQRSTUVWXYZ - Numbers:
0123456789 - Symbols:
!@#$%^&*()_+-=[]{}|;:,.<>?
Generate a simple 12-character password:
passgen
# Output: aB3kL9mX2wQ1passgen -l 20
# Output: aNaNYiQSO62KUcZbpiospassgen -l 16 -S
# Output: d8fP.|#<'I;<cZpQpassgen -l 10 --lowercase=false -U -N
# Output: BGXRH7624YUse only specific characters:
passgen -l 15 -U=false -L=false -N=false --custom "abcdef123456\!@#"
# Output: 4c6!f@bf4f#c1a3Prevent the last 3 characters from repeating:
passgen -l 20 -a 3
# Output: OXH7cMOJyagcCvjrcMlnPerfect for transferring passwords to mobile devices:
passgen -l 16 -S -q
# Output:
#
# βββββββββββββββββββββββββββββββββββββββ
# βββββββββββββββββββββββββββββββββββββββ
# βββββ βββββ βββ ββ β βββ ββ βββββ βββββ
# βββββ β β ββββββ β ββ ββ β β βββββ
# βββββ βββββ ββββββ β ββ βββ βββββ βββββ
# βββββββββββββ βββ βββ βββββββββββββββββ
# ββββββββββ ββββββββββ βββ β β βββββββββ
# ββββββββ βββ βββ ββ βββββββ ββββββββ
# ββββββ β ββββββ ββ β βββ ββ β βββββββ
# ββββββββββββββ ββββ β βββββ βββββββββ
# βββββ βββ ββ βββ β βββββββββββ β βββββ
# βββββ ββββββ β βββ β β ββ ββ ββββββββββ
# ββββββββββββββββββ β ββββ βββ βββββββββ
# βββββ βββββ βββ βββββββ β βββ βββββββββ
# βββββ β β ββ βββββββ β βββ ββββββ
# βββββ βββββ βββ ββ β ββ ββ βββββββββ
# βββββββββββββββββββββββββββββββββββββββ
# βββββββββββββββββββββββββββββββββββββββ
# βββββββββββββββββββββββββββββββββββββββ
#
# Password: ~xY%tEtf%xUiJ]D9- Cryptographically Secure: Uses Go's
crypto/randpackage for secure random number generation - No Predictable Patterns: Avoids consecutive character repetition with configurable history
- Flexible Character Sets: Full control over which characters can appear in your passwords
- Memory Safe: Passwords are not stored or logged anywhere
We welcome contributions from the community! Whether it's bug fixes, new features, documentation improvements, or testing, your help makes PassGen better for everyone.
- π Bug Reports: Found an issue? Please open a GitHub issue
- π‘ Feature Requests: Have an idea? We'd love to hear it
- π§ Code Contributions: Submit a pull request
- π Documentation: Help improve our docs
- π§ͺ Testing: Help us test on different platforms
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Your contributions, no matter how big or small, genuinely make me happy and help make this tool better for everyone in the community. Thank you for being part of this project! π
This project is licensed under the GPL License - see the LICENSE file for details.
If you encounter any issues or have questions:
- π Check this README for usage examples
- π Open an issue on GitHub
- π¬ Start a discussion in our GitHub Discussions
Made with β€οΈ for developers who care about security