wp-salts-cli
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

wp-salts-cli

License Version Build

Generate WordPress salts right in your shell, even when offline. Supports plain-text output as well as DotEnv, PHP, JSON, or YAML.

Installation

npm install wp-salts-cli -g

Usage

You can now use the wp-salts command to output WordPress salts:

Examples:

# Standard usage
wp-salts

# Output as DotEnv
wp-salts --dotenv

# Output specific strings as YAML
wp-salts SECURE_AUTH_KEY SECURE_AUTH_SALT --yaml

# Combine short-form flags
wp-salts -Pbul 128

Options

Running wp-salts --help list available flags

  -V, --version       output the version number
  -D, --dotenv        output as DotENV
  -J, --json          output as JSON
  -P, --php           output as PHP
  -Y, --yaml          output as YAML
  -b, --break         add line-breaks before and after the result
  -i, --indent <int>  indentation level for JSON output
  -l, --length <int>  length of the salt (default: 64)
  -s, --sort          sort keys alphabetically
  -u, --ugly          don't pretty-print JSON or PHP output
  -h, --help          display help for command

Note: The minimum length of each salt is 8-bit (64 characters)

Related

License

This work is licensed under The MIT License

Package Sidebar

Install

npm i wp-salts-cli

Weekly Downloads

54

Version

4.0.0

License

MIT

Unpacked Size

7.95 kB

Total Files

7

Last publish

Collaborators

  • idleberg