---
name: pass_set
kind: function
lang: bash
domain: infra
version: "1.0.0"
purity: impure
signature: "pass_set(entry: string, [value: string]) -> void"
description: "Inserta o sobreescribe un secreto en el password store (pass)."
tags: [pass, secret, credential, set, insert]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: []
params:
  - name: entry
    desc: "ruta de entrada en el password store"
  - name: value
    desc: "valor del secreto (opcional; se lee de stdin si no se proporciona)"
output: "sin salida"
tested: true
tests: ["inserta valor y lo lee de vuelta", "sobreescribe valor existente"]
test_file_path: "bash/functions/infra/pass_test.sh"
file_path: "bash/functions/infra/pass_set.sh"
---

## Ejemplo

```bash
source pass_set.sh
pass_set agentes/nuevo-servicio "token-abc123"
```

## Notas

Usa `pass insert -m -f` para forzar sobreescritura sin prompt interactivo. Si no se pasa valor como argumento, lee de stdin.
