# passworth-cli

> Random Password Generator

Latest version **3.0.1** (published 2023-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install passworth-cli
pnpm add passworth-cli
yarn add passworth-cli
bun add passworth-cli
```

Provides the command `passworth`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2023-04-07 |
| First published | 2023-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Vikram Mudaliar |
| Maintainers | vikramudaliar |
| Keywords | password, password-generator, generator, cli, pswd, random-password-generator, password-cli, pwdgen, passworth, pwsd-gen, pwgen |

## Links

- npm: https://www.npmjs.com/package/passworth-cli
- Repository: https://github.com/nfinit3/passworth-cli
- Homepage: https://github.com/nfinit3/passworth-cli#readme
- Issues: https://github.com/nfinit3/passworth-cli/issues
- npm.io page: https://npm.io/package/passworth-cli

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^17.7.1
- [node-clip](https://npm.io/package/node-clip.md) ^0.1.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2023-04-07
- 3.0.0 — 2023-04-05
- 2.1.0 — 2023-04-04
- 2.0.0 — 2023-04-04
- 1.1.1 — 2023-03-31
- 1.1.0 — 2023-03-31
- 1.0.1 — 2023-03-31
- 1.0.0 — 2023-03-31

## README

[![passworth cli](https://github.com/nfinit3/passworth-cli/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/nfinit3/passworth-cli/actions/workflows/npm-publish.yml)
![NPM](https://img.shields.io/npm/l/passworth-cli)
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/passworth-cli)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/nfinit3/passworth-cli)
![GitHub repo size](https://img.shields.io/github/repo-size/nfinit3/passworth-cli)
![npm](https://img.shields.io/npm/dw/passworth-cli)

# passworth-cli

This is a command-line interface (CLI) tool for generating passwords with customizable settings. This tool was built using Node.js and the yargs package for parsing command-line arguments.

## Demo

[https://passworth.nfinit3.io/]

## Getting Started

### Installation

```bash
npm i passworth-cli -g
```

### Usage

```bash
passworth [options]
```

Options:

* -l, --length [number]: The length of the password. Defaults to 12.
* -n, --numbers [boolean]: Include numbers in the password. Defaults to true.
* -u, --uppercase [boolean]: Include uppercase letters in the password. Defaults to true.
* -s, --special [boolean]: Include special characters in the password. Defaults to true.
* -h, --help: Show help.

Example:

```bash
passworth // Generates a random password with all default options and copies it to clipboard.
passworth -l 16 -n false // Generates a random password of 16 characters length with no numbers and copies it to clipboard.

```

This will generate a random password of 16 characters length and no numbers and copy the same to clipboard.

## Use in your NodeJS Project

> passworth-cli also provides you a module to use in your NodeJS projects for generating random passwords on the fly.

### Installation

```bash
npm i passworth-cli --save
```

### Usage

```javascript
import { passworth } from 'passworth-cli';
const password = passworth(); //Generates a Random password with all paramaeters as True and length of 12 => 'AY[5c[=K0MaD'
```

With Paramaters

```javascript
import { passworth } from 'passworth-cli';
const password = passworth(16, true, false, false); //Generates a Random password of 16 Chars with numbers and lowercases and no Special Characters or UpperCase => 'n3g1kacfqdv2owta'
```

You can also provide options using JSON format

```javascript
import { passworth } from 'passworth-cli';
const options = {
    length: 4,
    numbers: false,
    symbols: true,
    uppercase: true,
};
const password = passworth(options); //Generates a Random password of 4 Chars with no digits => 'Qb]p'
```

### License

This project is licensed under the MIT License - see the _LICENSE_ file for details.

---
_Source: https://npm.io/package/passworth-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
