_
| |
_ __ __ _ _ __ __| |_ __ __ _ ___ ___
| '__/ _` | '_ \ / _` | '_ \ / _` / __/ __|
| | | (_| | | | | (_| | |_) | (_| \__ \__ \
|_| \__,_|_| |_|\__,_| .__/ \__,_|___/___/
| |
|_|
$ > A simple, fast, secure command-line password generator- Generate cryptographically secure passwords
- Customizable password length
- Configurable character sets (lowercase, uppercase, digits, symbols)
- Clipboard support
- Clean, simple CLI interface
Download the latest release for your platform from the Releases page:
# Linux amd64
wget https://github.com/OlegChuev/randpass/releases/latest/download/randpass-linux-amd64.tar.gz
tar -xzf randpass-linux-amd64.tar.gz
chmod +x randpass-linux-amd64
sudo mv randpass-linux-amd64 /usr/local/bin/randpass
# macOS amd64
wget https://github.com/OlegChuev/randpass/releases/latest/download/randpass-macos-amd64.tar.gz
tar -xzf randpass-macos-amd64.tar.gz
chmod +x randpass-macos-amd64
sudo mv randpass-macos-amd64 /usr/local/bin/randpass
# macOS arm64 (Apple Silicon)
wget https://github.com/OlegChuev/randpass/releases/latest/download/randpass-macos-arm64.tar.gz
tar -xzf randpass-macos-arm64.tar.gz
chmod +x randpass-macos-arm64
sudo mv randpass-macos-arm64 /usr/local/bin/randpass# Clone and build
git clone <repository-url>
cd randpass
make build
# Or install to $GOPATH/bin
make installmake deps# Default 16-character password with all character types
randpass
# 24-character password without symbols
randpass -l 24 --no-symbols
# 12-character password with only uppercase and digits
randpass --length 12 --no-lower --no-symbols
# 20-character password copied to clipboard
randpass -l 20 -c
# Show help
randpass --help| Flag | Type | Default | Description |
|---|---|---|---|
--length, -l |
int | 16 | Password length |
--no-lower, -nl |
bool | false | Exclude lowercase letters |
--no-upper, -nu |
bool | false | Exclude uppercase letters |
--no-digits, -nd |
bool | false | Exclude numbers |
--no-symbols, -ns |
bool | false | Exclude symbols |
--copy, -c |
bool | false | Copy password to clipboard |
--help, -h |
bool | false | Show help message |
| Type | Characters |
|---|---|
| Lower | abcdefghijklmnopqrstuvwxyz |
| Upper | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| Digits | 0123456789 |
| Symbols | !@#$%^&*()-_=+[]{}<>?/ |
# Set up development environment
make dev-setup
# Run tests
make test
# Run benchmarks
make bench
# Run performance regression test
make performance-test
# Build and run
make run
# Format and lint code
make lintmake build- Build the binarymake run- Build and run with default settingsmake test- Run all testsmake lint- Format code and run go vetmake help- Show all available targets
- Uses
crypto/randfor cryptographically secure random number generation - No password storage or logging
- Secure random byte generation for each character selection
github.com/atotto/clipboard- Cross-platform clipboard access
See LICENSE file for details.