Generate a value into a secret
oneguard_secrets_generateCreate a new password, token, or key and store it in a secret without exposing the value. Preserves existing variables; fails if the key already exists unless force is used.
Instructions
Generates a random value and stores it in a secret under the given key, WITHOUT returning the value. This merges: every other variable in the secret is preserved (unlike oneguard_secrets_edit, which replaces the whole payload). Use this whenever the user wants a new password, token or key created for a service — it is the safe path, because the value never enters this conversation. Fails if the key already exists unless force is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The variable name to set, e.g. DB_PASSWORD. | |
| force | No | Replace the key if it already exists. Default false. | |
| vault | Yes | Vault id or its 8-character prefix. | |
| length | No | Number of characters. Default 16. | |
| secret | Yes | Secret id or its 8-character prefix. | |
| numbers | No | Include 0-9. Default true. | |
| special | No | Include !@#%^&*()-_=+[]{}|;:,.<>? . Default true. | |
| lowercase | No | Include a-z. Default true. | |
| uppercase | No | Include A-Z. Default true. | |
| min_numbers | No | Minimum digits in the value. Default 2. | |
| min_special | No | Minimum special characters. Default 2. |