Skip to content

amirhossein-fzl/passz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PassGen πŸ”

❗️ 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.

Features

πŸ”€ 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

Installation

From Source

git clone https://github.com/amirhossein-fzl/passgen.git
cd passgen
go build -o passgen cmd/main.go

Quick Start

Generate a default 12-character password with lowercase, uppercase, and numbers:

passgen

Generate a 16-character password with all character types:

passgen -l 16 -S

Usage

passgen [options]

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

Character Sets

By default, PassGen includes:

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

Examples

Basic Usage

Generate a simple 12-character password:

passgen
# Output: aB3kL9mX2wQ1

Custom Length

passgen -l 20
# Output: aNaNYiQSO62KUcZbpios

Include Symbols

passgen -l 16 -S
# Output: d8fP.|#<'I;<cZpQ

Only Numbers and Uppercase

passgen -l 10 --lowercase=false -U -N
# Output: BGXRH7624Y

Custom Character Set

Use only specific characters:

passgen -l 15 -U=false -L=false -N=false --custom "abcdef123456\!@#"
# Output: 4c6!f@bf4f#c1a3

Avoid Character Repetition

Prevent the last 3 characters from repeating:

passgen -l 20 -a 3
# Output: OXH7cMOJyagcCvjrcMln

Generate with QR Code

Perfect for transferring passwords to mobile devices:

passgen -l 16 -S -q
# Output: 
#
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆβ–„β–€ β–„β–„ β–€ β–ˆβ–„β–„ β–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆ   β–ˆ β–ˆβ–„β–€β–ˆβ–ˆβ–€  β–ˆ β–€β–ˆ β–„β–ˆ β–ˆ   β–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆβ–„β–ˆβ–„β–€β–€ β–„ β–ˆβ–ˆ β–ˆβ–„β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆ β–ˆβ–„β–€ β–€β–„β–ˆ β–ˆβ–„β–ˆβ–„β–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆ β–„β–ˆβ–ˆβ–„β–ˆβ–„β–„β–ˆβ–ˆβ–€ β–ˆβ–„β–„ β–€ β–ˆ β–€β–„β–€β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€β–€ β–ˆβ–„β–„  β–€β–ˆβ–ˆ β–„β–ˆ  β–€β–€β–ˆβ–„β–€β–ˆβ–„  β–ˆβ–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆ β–„β–ˆβ–„β–ˆβ–ˆβ–„ β–„β–€ β–ˆ β–€β–€β–„ β–€β–€   β–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€β–€β–„β–€β–ˆβ–„β–ˆβ–„ β–„β–ˆβ–€β–„  β–ˆ  β–ˆβ–„β–ˆβ–„β–€ β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–„β–„β–„ β–„β–„ β–€β–„β–„ β–ˆ β–„β–€β–€β–„β–€β–ˆβ–€β–ˆβ–„β–€β–„ β–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–„β–€β–„ β–„ β–€β–€β–„ β–„ β–„ β–ˆβ–€ β–ˆβ–„ β–ˆβ–„β–„β–ˆβ–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–„β–€β–„β–€β–€β–„ β–„ β–ˆβ–€β–€β–„ β–„β–„β–„ β–„β–„β–„β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆβ–€β–ˆ β–€β–„β–ˆβ–€β–€β–„β–„ β–„ β–ˆβ–„β–ˆ β–„β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆ   β–ˆ β–ˆβ–ˆ    β–„β–ˆβ–€β–€β–„β–„β–„  β–„ β–„β–„β–€ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆβ–ˆβ–ˆ β–€β–„ β–ˆ  β–„β–€ β–€β–„   β–„β–€β–„β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆβ–ˆβ–ˆβ–„β–ˆβ–ˆβ–„β–„β–„β–„β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
# 
# Password: ~xY%tEtf%xUiJ]D9

Security Features

  • Cryptographically Secure: Uses Go's crypto/rand package 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

Contributing

We welcome contributions from the community! Whether it's bug fixes, new features, documentation improvements, or testing, your help makes PassGen better for everyone.

Ways to Contribute

  • πŸ› 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

Getting Started

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. 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! πŸ™

License

This project is licensed under the GPL License - see the LICENSE file for details.

Support

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

About

Simple CLI tool for generate random and secure passwords.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors