set_secret
Set or merge write-only secrets for a service; returns only key names so agents can configure credentials without reading stored values.
Instructions
Set/merge write-only secrets for a service; returns key names only.
WARNING: the values you pass here transit this agent's transcript in
plaintext; for high-value shared keys (broadly-scoped API keys,
credentials shared across every app) prefer ``nerdit secrets set --shared`` from the CLI
instead of routing them through an agent. The leak-free path for any
value: a human runs ``nerdit secrets set <service> --prompt KEY``
(hidden input) and you only ever name ``KEY``; it is injected at
launch, overriding an ``env`` key of the same name. You may set secrets
before the service exists; the name is then reserved for your token
until you deploy it (another token's deploy of that name gets 409
``service.name_claimed``).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | KEY → value pairs merged into the stored set: a listed key is overwritten, an unlisted one kept. Key names are env-var identifiers (``[A-Za-z_][A-Za-z0-9_]*``); a value may be multi-line but may contain no NUL and no control character other than tab/newline/CR. An empty map is refused. | |
| service | Yes | Service (app, model or database) whose secrets this call modifies — need not exist yet: a set on an undeployed name reserves it for this token until deployed — or ``shared`` for the global scope (set: unscoped submitter or admin; delete: admin), read by a service only where a ``${secrets.shared.KEY}`` reference is honoured (``ai``/``db``/``edge_auth`` refs, a git ``token_ref``), never via ``env``. | |
| idempotency_key | No | Caller-chosen key: a retry with the same key replays the first result instead of acting twice. Omit and a fresh key is minted per call, so each call acts. |