Change a single value
Set one nested key without opening an editor; handy for scripted secret rotation.
sops --set '["db"]["password"] "s3cr3t"' secrets.enc.yaml
- tool
- sops4 commands
More sops commands
-
SOPS_AGE_RECIPIENTS=age1<id> sops -e -i secrets.yamlEncrypt only the values in place; keys stay readable, so diffs are still easy to review.
-
sops updatekeys secrets.yamlUpdate the file's recipients to match .sops.yaml and re-encrypt the data key for them, without decrypting the file by hand.
-
sops exec-env secrets.enc.yaml 'terraform apply'Pass decrypted secrets as env variables to one command; nothing is written to disk.