#password-generator #random-password #generator

bin+lib mkpasswd

Library and command-line tool to generate passwords

3 releases (breaking)

0.3.0 Apr 18, 2020
0.2.0 Aug 24, 2019
0.1.0 Mar 28, 2019

#18 in #random-password

Download history 5368/week @ 2025-12-10 4140/week @ 2025-12-17 682/week @ 2025-12-24 1977/week @ 2025-12-31 5267/week @ 2026-01-07 5060/week @ 2026-01-14 5357/week @ 2026-01-21 5723/week @ 2026-01-28 6095/week @ 2026-02-04 2893/week @ 2026-02-11 5558/week @ 2026-02-18 10578/week @ 2026-02-25 7477/week @ 2026-03-04 9596/week @ 2026-03-11 9446/week @ 2026-03-18 8894/week @ 2026-03-25

37,554 downloads per month

MIT license

18KB
235 lines

mkpasswd - generate passwords

travis-badge appveyor-badge crates.io-badge license-badge

Installation

Using cargo:

cargo install mkpasswd

You then have access to the mkpasswd command.

Usage

If you simply want a securely generated random password, simply run mkpasswd to get a password with special characters and a length of 32 letters.

However, the tool offer more options.

  • The password length can be set by passing a command line argument like mkpasswd 10, which will generate a 10-character password.

  • If you want to generate multiple passwords, pass --count or -n like mkpasswd -n 5.

You can always pass --help or -h to mkpasswd to retrieve this help.

Using alphabets

An alphabet defines the character the password can contain.

The standard alphabet is --password.

There a few predefined alphabets, which can passed directly:

--password              a-z, A-Z, 0-9, each of =+-*/,;:.!?&|^<>(){}_%@#
--latin-numbers         a-z, A-Z, 0-9
--base64                a-z, A-Z, 0-9, +, /
--base64-url            a-z, A-Z, 0-9, -, _
--numbers               0-9
--latin                 a-z, A-Z
--latin-lower           a-z
--latin-lower-numbers   a-z, 0-9
--latin-upper           A-Z
--latin-upper-numbers   A-Z, 0-9

Another option is passing a string containg all the characters you want after --alphabet or -a:

mkpass -a "qwertyQWERTY"

Dependencies

~210KB