mempass

command module
v1.16.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 1 Imported by: 0

README

mempass

A memorable password generator, a CLI version of xkpasswd.net written in Go. This tool uses libpass to generate passwords

Install

go install github.com/eljamo/mempass@latest

CLI Example Usage

Help
~ $ mempass -h
A memorable password generator, a CLI version of xkpasswd.net written in Go

Usage:
  mempass [flags]

Flags:
      --case_transform string           case transformation, allowed values: ALTERNATE, ALTERNATE_LETTERCASE, CAPITALISE, CAPITALISE_INVERT, INVERT, LOWER, LOWER_VOWEL_UPPER_CONSONANT, NONE, RANDOM, SENTENCE, UPPER (default "RANDOM")
      --custom_config_path string       custom config file path, you can use this to load a custom config. Such as ones generated by xkpasswd.net
  -h, --help                            help for mempass
      --num_passwords int               number of passwords to generate, valid values: 1+ (default 3)
      --num_words int                   number of words, valid values: 2+ (default 3)
      --pad_to_length int               length to pad the password to, will be ignored if less than the generated password length, valid values: 0+
      --padding_character string        character to pad the password with, example values: RANDOM, !, @, $, %, ^, &, *, -, +, =, :, |, ~, ?, /, ., ; (default "RANDOM")
      --padding_characters_after int    number of characters to pad after the password, valid values: 0+ (default 2)
      --padding_characters_before int   number of characters to pad before the password, valid values: 0+ (default 2)
      --padding_digits_after int        number of digits to pad after the password, valid values: 0+ (default 2)
      --padding_digits_before int       number of digits to pad before the password, valid values: 0+ (default 2)
      --padding_type string             padding type, allowed values: ADAPTIVE, FIXED, NONE (default "FIXED")
      --preset string                   use a built-in preset. Valid values: DEFAULT, APPLEID, NTLM, SECURITYQ, WEB16, WEB16_XKPASSWD, WEB32, WIFI, XKCD, XKCD_XKPASSWD (default "DEFAULT")
      --score                           show throttled/unthrottled zxcvbn strength scores next to each password, e.g. (Throttled [4/4, Very Strong], Unthrottled [2/4, Fair])
      --separator_alphabet strings      comma-separated list of characters to separate password parts, example values: !, @, $, %, ^, &, *, -, +, =, :, |, ~, ?, /, ., ;
      --separator_character string      character to separate password parts, example values: RANDOM, !, @, $, %, ^, &, *, -, +, =, :, |, ~, ?, /, ., ; (default "RANDOM")
      --symbol_alphabet strings         comma-separated list of characters to pad the password with, example values: !, @, $, %, ^, &, *, -, +, =, :, |, ~, ?, /, ., ;
  -v, --version                         version for mempass
      --word_length_max int             maximum word length, valid values: 1+ (default 8)
      --word_length_min int             minimum word length, valid values: 1+ (default 4)
      --word_list string                use a built-in list of words. Valid values: 40K, ALL, DOCTOR_WHO, EN, EN_SMALL, GAME_OF_THRONES, HARRY_POTTER, MIDDLE_EARTH, POKEMON, STAR_TREK, STAR_WARS, SUNBORN (default "EN")
Using the built-in default preset
~ $ mempass
;;06%ride%GLUTEN%INPUTS%47;;
..86%INDICATE%SLAW%reabsorb%15..
--23!UNTAXED!decades!vertex!20--
Using a custom config generated on xkpasswd.net
~ $ mempass --custom_config_path ./config_generated_from_xkpasswd.net.json
freedom-SUBARU-POSTCARD-MATCH-67;
warriors-CASTING-ROSTER-RELEVANT-04&
REFINED-triumph-WEST-MARVEL-03$
Show a strength score for each password
~ $ mempass --score
%%07=pronto=deserve=WALRUS=82%%    (Throttled: [4/4, Very Strong], Unthrottled: [4/4, Very Strong])
$$64&WISDOM&GMBH&poster&69$$       (Throttled: [4/4, Very Strong], Unthrottled: [4/4, Very Strong])
//22~classic~arrange~CLUBBED~61//  (Throttled: [4/4, Very Strong], Unthrottled: [4/4, Very Strong])
Using the built-in XKCD preset
~ $ mempass --preset XKCD
crispy-VERIFIED-MANGLE-award-46@
DUSK-rivers-support-encoding-49|
UNICORN-PROWLING-baffle-PASTOR-40^
Using the built-in XKCD preset to generate 10 passwords
~ $ mempass --preset XKCD --num_passwords 10
jersey-RICHLY-upstage-shaped-41?
UPSTREAM-CAROLINE-DESPISE-morbidly-23|
appease-blush-COLONISE-DEFAULT-58+
WRITERS-ware-pride-ROPELIKE-11;
saloon-MAMA-thomas-DUBBED-57.
SECOND-encode-town-WINDMILL-15@
GLASS-PLEDGE-DOUGLAS-defame-03+
away-ENVIABLY-HIRING-UNFITTED-73?
FLAGSHIP-bargraph-baboon-expand-06|
classes-tiger-REAR-beer-36@
Using the built-in XKCD preset to generate passwords with 10 words in them
~ $ mempass --preset XKCD --num_words 10
retailer-pools-COMMENT-GLASS-programs-STANDS-offense-CONSIDER-business-bald-50+
GRAY-jury-special-FORMER-helping-ALGERIA-networks-precise-quoted-ELECTRO-53_
WALKING-advanced-MUSLIM-review-KNOW-hughes-spas-PHYS-FARM-GOSSIP-12=
Using the built-in XKCD preset to generate passwords using the Middle Earth word list
~ $ mempass --preset XKCD --word_list MIDDLE_EARTH
LEGOLAS-SPEAKS-clinking-anigh-79%
lowlands-liable-ARCHIVE-QUIVERED-61&
ADVANCE-readily-AMROD-occupied-82%
Using the built-in WEB32 preset to generate passwords and pad them to length of 32 characters
~ $ mempass --preset WEB32 --padding_type ADAPTIVE --pad_to_length 32
74|owned|ELDER|hear|CROWD|91++++
93=andy=FEVER=stem=FORK=23&&&&&&
44-pins-MUSHY-packs-MODES-46!!!!

Development

Run locally after git clone
~/c/g/mempass $ go run .
--28-chrome-dream-clocks-28--
==63@DIVIDE@glossary@tough@36==
$$53?LOTTERY?HAVE?HOTMAIL?81$$
Build & Run
~/c/g/mempass $ go build -o ./bin/mempass ./main.go && ./bin/mempass
__43:RATIOS:jobs:baghdad:37__
;;87=struggle=rich=think=08;;
..25~ESCORTS~scene~NOTICED~62..

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL