gopassgen

module
v0.0.0-...-07c1b2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: Apache-2.0

README

gopassgen (Go password generator)

A command-line application to generate random passwords and keys, with options to customize the password characteristics and copy the generated password to the clipboard.

Features

  • Generate random passwords of specified length
  • Exclude uppercase letters, lowercase letters, digits, or special characters
  • Include specific characters in the generated password
  • Copy the generated password to the clipboard

Installation

To install the application, first clone the repository and navigate to the project directory:

git clone https://github.com/mohrezfadaei/passgen-cli-cli.git
cd passgen-cli-cli

Build the application:

make build

Usage

To generate a password, run the application with the desired flags:

./passgen-cli [flags]
Available Flags
  • --length, -l [number]: The length of the password (default: 16)
  • --exclude-uppercase: Exclude uppercase letters (default: false)
  • --exclude-lowercase: Exclude lowercase letters (default: false)
  • --exclude-digits: Exclude digits (default: false)
  • --exclude-special-characters: Exclude special characters (default: false)
  • --include-chars [chars]: Characters to include in the password
  • --copy: Copy the generated password to the clipboard (default: false)
Examples

Generate a default password of length 16:

./passgen-cli

Generate a password of length 20 without uppercase letters:

./passgen-cli --length 20 --exclude-uppercase

Generate a password that includes specific characters:

./passgen-cli --include-chars "&$Df"

Generate a password and copy it to the clipboard:

./passgen-cli --length 20 --copy

Development

Running Tests

To run the tests for the application:

make test
Formatting Code

To format the code:

make fmt
Linting Code

To lint the code:

make lint
Cleaning Up

To clean up the build artifacts:

make clean

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Acknowledgments

This application uses the following libraries:

  • Cobra for command-line interface
  • Clipboard for clipboard functionality

Directories

Path Synopsis
internal
cli
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL