This version is still in development and is not considered stable yet. For the latest stable version, please use ol.sops 0.1!

ol.sops

An extremely tiny and simple wrapper around the awesome sops (previously known as mozilla/sops)

doc status: maturing built with garnix Clojars Project

This is intended for babashka and JVM clojure and provides an idiomatic and data driven wrapper around the CLI tool.

Project status: Maturing.

Installation

;; deps.edn
{:deps {com.outskirtslabs/sops {:mvn/version "0.1.0"}}}

;; Leiningen
[com.outskirtslabs/sops "0.1.0"]

Quick Start

(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"})

Security

See here for security advisories or to report a security vulnerability.

License

Copyright © 2025 Casey Link casey@outskirtslabs.com

Distributed under the MIT License