pwgen-go

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 3 Imported by: 0

README

pwgen-go

GitHub release (latest by date) Build Go Report Card

Command line passphrase generator written in Go.

The EFF Diceware Wordlists are embedded, with the long wordlist used by default. See the EFF's Deep Dive for more details on the benefits of this word list.

Installation

APT (Ubuntu, Debian)
Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo apt install ca-certificates
    
  2. Add gabe565 apt repository

    echo 'deb [trusted=yes] https://apt.gabe565.com /' | sudo tee /etc/apt/sources.list.d/gabe565.list
    
  3. Update apt repositories

    sudo apt update
    
  4. Install pwgen-go

    sudo apt install pwgen-go
    
RPM (CentOS, RHEL)
Click to expand
  1. If you don't have it already, install the ca-certificates package

    sudo dnf install ca-certificates
    
  2. Add gabe565 rpm repository to /etc/yum.repos.d/gabe565.repo

    [gabe565]
    name=gabe565
    baseurl=https://rpm.gabe565.com
    enabled=1
    gpgcheck=0
    
  3. Install pwgen-go

    sudo dnf install pwgen-go
    
AUR (Arch Linux)
Click to expand

Install pwgen-go-bin with your AUR helper of choice.

Homebrew (macOS, Linux)
Click to expand

Install pwgen-go from gabe565/homebrew-tap:

brew install gabe565/tap/pwgen-go
Manual Installation
Click to expand

Download and run the latest release binary for your system and architecture.

Usage

Run pwgen to generate a list of random passphrases. All random functions use cryptographically secure (crypto/rand) random strings.

Predefined profiles can be used with the --profile (-p) flag. See pwgen profiles for a list of defaults.

Alternatively, the template can be directly customized with the --template (-t) flag.

To change the number of generated results, pass a different number to the --count (-c) flag.

Also see the generated docs.

Example
$ pwgen
Pebbly1-Destitute-Shelve
Mushiness-Possibly0-Trustee
Trimness-Freebase2-Spotless
Recall7-Uncrushed-Agreeing
Tavern-Moustache1-Scrubber
Lyrically2-Comic-Imitate
Idiom-Jockey-Subheader6
Blot-Sympathy9-Nurture
Womanhood6-Capsize-Zigzagged
Unwomanly-Unwashed1-Urchin

Configuration

A configuration file will be generated the first time pwgen-go is run. Depending on your operating system, the file will be available at:

  • Windows: %AppData%\pwgen-go\config.toml
  • macOS: ~/Library/Application Support/pwgen-go/config.toml
  • Linux: ~/.config/pwgen-go/config.toml

An example configuration is also available at config_example.toml.

Templating

Templated passphrases are generated using Go's text/template package.

All Sprig functions are available, plus some extras documented here.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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