A small, offline CLI that generates cryptographically secure random passwords using Python's secrets module.
- Python 3.6+
python3 pass-gen.py [options]Options
| Option | Description |
|---|---|
-l, --length N |
Password length (default: 20, minimum: 8) |
-n, --count N |
Number of passwords to generate (default: 1) |
--no-symbols |
Use only letters and digits (no symbols) |
Examples
python3 pass-gen.py
python3 pass-gen.py -n 3
python3 pass-gen.py -l 24 --no-symbolsExample Output
❯ python3 pass-gen.py
BD5sZh6xmU?ZqDGxxq1z
❯ python3 pass-gen.py -n 3
e-N=JMcK*$$c&oA?M+5l
0-AJiwUGudb!0OTfH19J
nOtnxw5knJwF9dWE?C33
❯ python3 pass-gen.py -l 24 --no-symbols
08sFvW8W8JoghV2Di2Xa1EdnMIT