GenPass
Secure password generator CLI written in Python.
Generate strong, random passwords from the command line with customizable character sets.
Features
- Specify password length and quantity
- Include/exclude:
- Lowercase letters (
--lower) - Uppercase letters (
--upper) - Digits (
--digits) - Symbols (
--symbols)
- Lowercase letters (
- Optional custom symbol set (
--symbol-set) - Ensure at least one character from each selected type (can be disabled with
--no-ensure) - Shell completions for bash, zsh, and fish
- Easy installation via pipx or local script
Installation
1. Via pipx (recommended)
pipx install git+https://github.com/kilyabin/GenPass
2. Local installation
Clone the repo and run the install script:
git clone https://github.com/kilyabin/GenPass.git
cd genpass
./install.sh
This will also set up shell completions for bash, zsh, and fish.
Usage
Generate a single password (default 16 characters):
genpass --lower --upper --digits --symbols
Generate 5 passwords of length 20:
genpass -l 20 -n 5 --lower --upper --digits --symbols
Use a custom symbol set:
genpass --symbols --symbol-set "!@#%&"
Disable "ensure each type" rule:
genpass --lower --upper --digits --no-ensure
Shell Completion
After installation, completions are automatically copied to your shell folders. Restart your shell or source the completion files manually:
Bash
source ~/.local/share/bash-completion/completions/genpass
Zsh
source ~/.local/share/zsh/site-functions/_genpass
Fish
source ~/.local/share/fish/vendor_completions.d/genpass.fish
Development
- Install in editable mode for development:
pipx install --editable .
- Make changes in
genpass/cli.pyand test immediately.
Contributing
Contributions are welcome! Please fork the repo and submit pull requests. Ensure code follows PEP8 style and add shell completion tests if applicable.
License
This project is licensed under the MIT License – see the LICENSE file for details.