Copy a stored secret to a file or service
secret_writeWrite stored values to allowlisted env files, JSON/YAML keys, systemd, GitHub Actions, or clipboard without exposing them. Preview changes with dry_run; first use of each target needs approval.
Instructions
Writes stored values to an allowlisted target without exposing them: env-file (local or ssh host; updates only that key, keeps comments, 0600, atomic, optional backup), json/yaml by key path, systemd EnvironmentFile drop-in, GitHub Actions secret (gh, via stdin) or the clipboard (only after the person clicks, auto-cleared). First use of each target needs approval. dry_run tells which keys would be created/updated. Returns {written, target, keys:[{key, action}]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | secret name → key in the target (default: the target key or the secret name) | |
| name | No | ||
| names | No | ||
| target | Yes | ||
| dry_run | No |