5 releases (1 stable)
Uses new Rust 2024
| 1.0.1 | Apr 10, 2026 |
|---|---|
| 0.2.1 | Apr 10, 2026 |
| 0.2.0 | Apr 10, 2026 |
| 0.1.1 | Apr 10, 2026 |
| 0.1.0 | Apr 10, 2026 |
#2331 in Command line utilities
14KB
pswd
A minimal, fast CLI password generator written in Rust. Generated passwords are automatically copied to the clipboard.
Usage
pswd [OPTIONS] [LENGTH]
Arguments
| Argument | Default | Description |
|---|---|---|
LENGTH |
32 |
Length of the generated password |
Options
| Flag | Description |
|---|---|
-e, --exclude-special |
Use only alphanumeric characters (no special characters) |
-n, --no-copy |
Print the password without copying to clipboard |
-h, --help |
Print help |
Examples
# Generate a 32-character password (default)
pswd
# Generate a 16-character password
pswd 16
# Generate a 64-character password without special characters
pswd 64 --exclude-special
# Generate a password without copying to clipboard
pswd --no-copy
Character Sets
| Mode | Characters |
|---|---|
| Default | A-Z, a-z, 0-9, !@#$%^&*()_+-=[]{}|;:,.<>? |
--exclude-special |
A-Z, a-z, 0-9 |
Installation
From crates.io
cargo install pswd
From source
git clone https://github.com/masiama/pswd
cd pswd
cargo install --path .
License
MIT
Dependencies
~7–41MB
~594K SLoC