sops Command Examples

SOPS (Secrets OPerationS): a simple and flexible tool for managing secrets. More information: https://github.com/mozilla/sops.

sops -e {{path/to/file.json}} > {{path/to/file.enc.json}}

sops -d {{path/to/file.enc.json}}

sops updatekeys {{path/to/file.enc.yaml}}

sops -r {{path/to/file.enc.yaml}}

sops -d --input-type json {{path/to/file.enc.json}}

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

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