Replace a secret's contents
oneguard_secrets_editReplace a secret's entire payload with new values. Overwrites all existing keys, so use when you need to update a secret completely.
Instructions
Replaces a secret's stored payload. IMPORTANT: this overwrites the whole payload — a single key/value pair replaces every key the secret held. To change one variable while keeping the rest: for a generated value use oneguard_secrets_generate (which merges), otherwise sync the secret to a .env file, edit that file, and push it back with from_env_file. Confirm with the user before calling this.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Single key name. WARNING: replaces all other keys. | |
| name | No | Secret name. Required by the CLI; omit to reuse the current name. | |
| value | No | Single value. WARNING: replaces all other keys. | |
| vault | Yes | Vault id or its 8-character prefix. | |
| secret | Yes | Secret id or its 8-character prefix. | |
| project_dir | No | Absolute path to the developer's project directory. This is where the .oneguard link file and the .env file live. Must be absolute — ask the user if you do not know it. | |
| from_env_file | No | Path to a .env file, relative to project_dir (default ".env"). Preferred: sends the full set of variables. |