An extremely tiny and simple wrapper around the awesome sops (previously known as mozilla/sops)
This is intended for babashka and JVM clojure and provides an idiomatic and data driven wrapper around the CLI tool.
{:deps {com.outskirtslabs/sops {:mvn/version "0.1.0"}}}
;; Leiningen
[com.outskirtslabs/sops "0.1.0"](ns myapp.core
(:require [ol.sops :as sops]))
;; decrypt a sops file to string
(sops/decrypt-file-to-str "dev/test.sops.yml"
{:env {"SOPS_AGE_KEY_FILE" "dev/keys.txt"}})
;; => "hello: world\n"
;; encrypt a plaintext to a sfile
@(sops/encrypt-to-file "output.sops.json"
(edn->json {:foo "bar"})
{:age "age15905pjs5av9nyh8rdt4zrzn7x0mdud20eyf7tsvz63mygvsfhd9sclsh94"})See here for security advisories or to report a security vulnerability.
Copyright © 2025 Casey Link [email protected]
Distributed under the MIT License