sudo-secretspec is a privilege-separated companion to
SecretSpec for autonomous local AI and operator use on
macOS and Linux. One privilege-separated broker mediates every credential read, write and
use, so an agent running as your user can use secrets without being able to read
the store, pick another provider, or skip the audit log.
This repository (frdminc/sudo-secretspec) is a downstream fork of
cachix/secretspec. Upstream remains the
declaration and provider engine. This build also includes the SQLite provider and
its verify-history command from secretspec-sqlite, the privilege-separated
broker, and packages for macOS and Linux.
| Upstream | cachix/secretspec |
| Based on | v0.21.1 plus 49 upstream commits, up to d3a1d081 (2026-10-31) |
| Downstream releases | 0.21.1-sudo.N · Latest published release and installers |
| Upstream README at that version | cachix/secretspec@d3a1d081 README.md |
| Upstream README, current | cachix/secretspec@main README.md |
The commits past v0.21.1 are unreleased upstream work, so some features in the
upstream documentation carry a 0.22+ label even though this fork is stamped
0.21.1-sudo.N. Upstream's product README, with its providers, SDKs and
secretspec CLI reference, is kept unchanged in this tree at
secretspec/README.md.
The macOS service ships from 0.21.1-sudo.6. Integrated Linux capture, status and isolated restore require 0.21.1-sudo.10 or later.
The downstream companion adds opt-in whole-vault backups with encrypted local
Git history, an append-only SSH mirror, hourly and filesystem-change capture,
and isolated restore commands. sudo-secretspec doctor reports missing,
unhealthy, or stale backup protection as advisory warnings. Installing the
package never enables backups or creates recovery keys. See
backup setup, health, and recovery and
sudo-secretspec backup --help (0.21.1-sudo.6+).
Use --pool NAME to select a separately provisioned service account, vault and
audit ledger. The existing installation serves the default pool.
See operator provisioning and integrity checks.
| System | Install the fork |
|---|---|
| Apple Silicon macOS | From a reviewed release checkout, run ./packaging/homebrew/install-or-upgrade.sh. It verifies the new client and broker installer before cleaning up older fork versions. Homebrew instructions |
| Debian or Ubuntu, amd64 or arm64 | Install sudo-secretspec from the signed APT repository or use the verified release .deb. Repository setup and package verification |
| NixOS | Select #secretspec for the client. To install it alongside a declared broker, enable services.sudo-secretspec.cli.enable. NixOS module |
Standalone x86_64 Linux installer media is also available on the releases page.
Starting with 0.21.1-sudo.12, the Homebrew, Debian and Nix packages provide
git-credential-secretspec and docker-credential-secretspec as links to the
same secretspec executable.
To enable privilege separation, an operator runs the bootstrap from the installed package or declares the broker in the NixOS configuration. Package upgrades stage the new broker for the operator to activate. Broker setup for your platform
sudo-secretspec check --reason "smoke"
sudo-secretspec run --reason "start gateway" -- your-commandEvery mediated operation takes a short --reason; the audit ledger stores only
its SHA-256 digest. Run consumers with run, never by extracting values into
shell history or arguments.
The companion exposes add, undeclare, set, delete, get, check,
export, run, template-check, schema, audit-verify and doctor, plus
the operator-only install, uninstall and rollback. It deliberately has no
config, import, init, cache or audit: config and import would let a
caller choose which store answers or copy secrets out of the boundary.
- A single mediated path for credential create, read, update, delete and use.
- Fail-closed, value-free SQLite audit (
broker-audit.sqlite3); an audit failure stops the operation. - No caller-selected manifest, provider or profile; those come from the installed config.
- Ownership, mode and the resolved vault path are enforced before every
operation, not only by
doctor. doctoris metadata-only and never repairs.- The passwordless sudo policy covers mediated broker commands. On macOS it
also covers
doctor. Debian and Ubuntu reservedoctorfor administrators. NixOS manages the boundary through its module. - Rollback snapshots restore installed artifacts, not secret values.
Policy for agents and automation: sudo-secretspec/AI-GUIDANCE.md
and the distributable skills described below.
To set up with an AI assistant, start with the onboarding guide (0.21.1-sudo.12+).
/secretspec covers managed credentials, plain
SecretSpec projects and team SOPS/age sharing. It treats managed or unclear tasks
as broker tasks and never falls back to another provider.
/sudo-secretspec remains as an entry to its
managed mode. Link or copy both directories into your agent's skills
directory, keeping them side by side.
| Package | Skills directory |
|---|---|
| Homebrew | $(brew --prefix)/opt/sudo-secretspec/share/sudo-secretspec/skills/ |
| Debian/Ubuntu | /usr/lib/sudo-secretspec/installer/share/sudo-secretspec/skills/ |
| Linux tar | share/sudo-secretspec/skills/ in the extracted archive |
| Nix | share/sudo-secretspec/skills/ in the sudo-secretspec package output |
The collection helper needs python3. Project and sharing work needs the
secretspec CLI (not in the Linux tar); sharing also needs sops and age.
| Topic | File |
|---|---|
| Companion install, usage, installed paths, Linux/NixOS | sudo-secretspec/README.md |
| AI and automation contract | sudo-secretspec/AI-GUIDANCE.md |
| Release process, Homebrew and Linux packaging | packaging/README.md |
| Fork development notes and build lessons | FORK-AI.md |
| Version scheme and branch policy | CLAUDE.md |
| Changelog | CHANGELOG.md |
Upstream product (providers, SDKs, secretspec CLI) |
secretspec/README.md, https://secretspec.dev |
Workspace member: sudo-secretspec-cli (binary sudo-secretspec). All
downstream work commits directly to sudo-main; main is the upstream mirror
only. Versions are 0.21.1-sudo.N, where N counts downstream releases on the
current upstream base.
Apache License 2.0, as upstream. See LICENSE.