generator
is a command-line interface (CLI) application written in Golang that is used to generate random passwords. It has the ability to generate passwords containing alphabetical characters, numeric characters, special symbols, and base 64 encoded passwords. This application is intended to be used for development purposes where you need to generate a password quickly, such as for generating a JWT secret.
To install generator
follow the steps below:
-
Make sure you have Golang installed on your system. If not, download it from the official website (Or just download the binary that is releavant to your operating system with Github releases)
-
Open the terminal and type the following command
go install github.com/VinukaThejana/generator@latest
generator
canbe used to generate different types of passwords depending on your requirements. By default, the generated password length is 32 characters. However, you can specify the length of the password by using the --length
flag.
generator
has the following flags that can be used globally
--length
: Specify the length of the password to be generated. Default value is 32.--help
: Shows help for the application and each command.
generator
has the following subcommands:
-
alpha
: Generates a password that only contains alphabetical characters
Example :- Generate a alphabetical password that contains 20 charactersgenerator alpha --length=20
-
numeric
: Generates a password that only contains numeric characters
Example :- Generate a numeric only password that only contains 100 charactersgenerator numeric --length=100
-
symbols
: Generates a password that only contains symbols
Example :- Generate a symbol only password that contains 16 charactersgenerator symbols --length=16
-
base64
: Generated a base64 encoded passcode
Example :- Generate a base64 encoded password (Not providing the length means that it have 32 characters)generator base64
generator
is licensed under the MIT License