lprs/docs/commands/gen.md
Awiteb 4133b0fe1e
All checks were successful
Rust CI / Rust CI (pull_request) Successful in 1m56s
docs: Update the docs
- Remove the version option
- Update it with the changes of this commit 4028607cb5
(current patch)

Signed-off-by: Awiteb <a@4rs.nl>
2024-08-17 18:20:04 +03:00

37 lines
912 B
Markdown

# Generating a password
## Usage
```
Usage: lprs get <INDEX-or-NAME> [FIELD]
Arguments:
[LENGTH] The password length [default: 18]
Options:
-u, --uppercase With uppercase letters (A-Z)
-l, --lowercase With lowercase letters (a-z)
-n, --numbers With numbers (0-9)
-s, --symbols With symbols (!,# ...)
-h, --help Print help
```
Generate a password with the specified length, by default the length is `18`,
you can specify the length by passing the `LENGTH` argument.
This command is useful when you need to generate a password for a new vault.
## Examples
Generate a password of length 20 with uppercase letters, lowercase letters,
numbers, and symbols:
```sh
lprs gen 20 -ulns
```
Generate a password of length 20 for a new vault:
```sh
lprs add my-vault -u 'username' -p $(lprs gen 20 -ulns)
```
## Notes
- You must specify at least one of the options to generate a password.