Surgical value edit

Set a single nested key without opening an editor; great for scripted rotation

sops --set '["db"]["password"] "s3cr3t"' secrets.enc.yaml

tool
sops4 commands
tags
sopssecretscitroubleshooting

More sops commands

  • SOPS_AGE_RECIPIENTS=age1<id> sops -e -i secrets.yaml

    Encrypt only values in place; note: keys stay readable so diffs stay reviewable

  • sops updatekeys secrets.yaml

    Rotate data key to recipients in .sops.yaml without re-encrypting plaintext manually

  • sops exec-env secrets.enc.yaml 'terraform apply'

    Inject decrypted secrets as env vars for one command; note: nothing hits disk

all 4 sops commands