sops

SOPS (Secrets OPerationS): manage secrets. More information: https://github.com/mozilla/sops.

sops -e path/to/myfile.json > path/to/myfile.enc.json

sops -d path/to/myfile.enc.json

sops -r path/to/myfile.enc.yaml

sops -d --input-type json path/to/myfile.enc.json

sops -d --extract '["an_array"][1]' path/to/myfile.enc.json

diff <(sops -d path/to/secret1.enc.yaml) <(sops -d path/to/secret2.enc.yaml)