Create a secret
oneguard_secrets_addAdds a new secret to a vault from a local .env file or a single key/value pair. Using the .env file is preferred so secret values are not exposed in conversation.
Instructions
Creates a new secret in a vault from a local .env file (preferred) or from a single key/value pair. Prefer from_env_file: passing a value directly means the secret value travels through this conversation. To create a secret holding a NEW generated value, create it here and then use oneguard_secrets_generate, which never reveals the value. Never invent secret values — only use what the user explicitly provided or what is already in their .env file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Single key name. Only when not using from_env_file. | |
| name | Yes | Name for the new secret (e.g. "production", "staging"). | |
| value | No | Single value. Only when not using from_env_file. | |
| vault | Yes | Vault 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 over key/value. |