openssl base random password generator
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-02 11:55:09 +02:00
bin Better version 2026-09-02 11:55:09 +02:00
README.md add readme 2026-08-29 18:39:49 +02:00

mkpw

Generates random passwords, as a grid to pick from in a terminal or as a single one when piped.

Installation

tpm install mkpw

Usage

mkpw                  # 40 passwords of 30 characters, in a grid
mkpw 16               # 40 passwords of 16 characters
mkpw 16 10            # 10 passwords of 16 characters
mkpw 32 | xclip -sel c  # a single password, no trailing newline

Notes

  • Randomness comes from openssl rand; the alphabet is URL-safe base64 (A-Z a-z 0-9 - _), so the passwords can be pasted anywhere without escaping.
  • When stdout is not a terminal, exactly one password is printed with no trailing newline, which makes piping into a clipboard or a config file straightforward.
  • The grid width is computed for an 80-column terminal.