Skip to content

Axel-cmd/password-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

password-generator

License: MIT

📝 Description

password-generator is a simple Python script that generates random and secure passwords.
It can be used for quickly creating strong passwords for personal use, secure accounts, or any situation requiring a high-entropy password.

Features:

  • Generate customizable passwords with various character sets
  • Automatic clipboard copy - Generated passwords are automatically copied to your clipboard for easy pasting
  • Simple command-line interface

📦 Requirements

Before using this tool, make sure you have:

  • Python 3.8+
  • pyperclip library (for clipboard functionality)

Install dependencies

pip install pyperclip

🛠 Installation

Clone the repository:

git clone https://github.com/Axel-cmd/password-generator.git
cd password-generator

▶️ Run the script without typing python (Linux)

If you want to execute the script directly like a normal command (without typing python before), follow these steps:

1️⃣ Add a shebang at the top of your script

At the top of your password.py file, make sure there is:

#!/usr/bin/env python3

2️⃣ Make the file executable

In your project folder, run:

chmod +755 password.py

4️⃣ Make it available everywhere

If you want to run it from anywhere in your system using only its name:

sudo cp password.py /usr/local/bin/password

or the following command allowed the command for all users:

sudo cp password.py /bin/password

Then simply use:

password

🧰 Command Help & Options

Below is the list of available commands and options supported by the script.

📌 Basic Commands

Command Description
password Generates an 8-character password using lowercase letters only (default).
password <length> Generates a password with the specified length.
password <length> [options] Generates a password with custom length and optional character sets (see options below).

🔧 Available Options

You can add one or several options when generating a password:

Option Description
-u Adds uppercase letters to the password.
-d Adds digits (0-9).
-s Adds special characters.
--help Display options for the command password in the console.

📝 Example Usage

password                 # 8 lowercase characters (default)
password 12              # 12 lowercase characters
password 16 -u           # 16 chars, including uppercase
password 20 -ud          # 20 chars, uppercase + digits
password 24 -uds         # 24 chars, all character sets
password --help          # list all options

💡 Note: All generated passwords are automatically copied to your clipboard, so you can paste them directly where needed!

About

A fast and customizable Python tool to generate secure, high-entropy passwords from the command line.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages