This is a simple command-line tool written in Go for generating secure random passwords. You can customize the password length and choose whether to include uppercase letters, numbers, and symbols. Additionally, the generated password can be copied directly to your system clipboard.
- Generate random passwords of a specified length.
- Include/exclude uppercase letters, numbers, and symbols.
- Option to copy the generated password to the system clipboard.
- Go 1.16 or higher.
- github.com/atotto/clipboard for clipboard functionality.
- Clone the repository:
git clone https://github.com/renancavalcantercb/password-generator-cli.git- Change to the project directory:
cd password-generator-cli- Install the dependencies:
go mod tidy- Build the project:
go build -o password-generator-cliRun the command with different flags to generate a password:
./password-generator-cli [options]The available options are:
--length: Set the length of the password (default: 12).
--uppercase: Include uppercase letters in the password (default: true).
--numbers: Include numbers in the password (default: true).
--symbols: Include symbols in the password (default: true).
--copy: Copy the generated password to the system clipboard (default: false).
Generate a 16-character password with uppercase letters, numbers, and symbols, and copy it to the clipboard:
./password-generator-cli --length=16 --uppercase=true --numbers=true --symbols=true --copy=trueGenerated Password: aB3!@f#4G8%qL9kP
Password copied to clipboard!