A simple password generator written in Go.
As Posted on ebourgess.dev
This script generates random passwords based on user-defined criteria such as length and character types.
- Customizable password length
- Option to include uppercase letters, lowercase letters, numbers, and special characters
- Secure and random password generation
-
Clone the repository:
git clone https://github.com/ebourgess/pass-generator.git
-
Build the executable:
go build pass-generator.go
-
To use it globally move it to
/usr/local/bin
sudo mv pass-generator /usr/local/bin
pass-generator -h
--digits
Use digits
--length int
Password length (default 12)
--lower
Use lowercase letters (default true)
--special
Use special characters
--upper
Use uppercase letters (default true)
In order to use this simply run the command
pass-generator --length 32 --digits --lower --special --upper
Keep in mind that by default, length
is 12, lower
and upper
are both enabled. So if you need to add digits
or special
characters, you will need to add the flags special
and upper
to your command.
In order to test your password's strength, copy and paste it here
This project is licensed under the MIT License. See the LICENSE file for more information.