SOPS + age starter kit ====================== Companion files for the article at https://fredlackey.com/sops-age-secrets Read the article first. It explains every file and every command below. Some files are named differently here than in your repository, because web servers often refuse to serve names that start with a dot. Copy each one to the path in the right-hand column, relative to the root of your repository. Download Put it at ----------------------- ------------------------------------------------- secret.mjs scripts/secret.mjs pre-commit .githooks/pre-commit gitattributes.txt .gitattributes (or add its lines to your own) gitignore.txt .gitignore (or add its lines to your own) AGENTS-secrets.txt paste into AGENTS.md (create it if you have none) claude-settings.json .claude/settings.json (merge with your own) action.yml .github/actions/setup-sops/action.yml integration-tests.yml .github/workflows/integration-tests.yml Files you do NOT copy, because the helper creates them for you: .sops.yaml generated by "node scripts/secret.mjs add-recipient" .sops/recipients.txt the access list, also written by add-recipient secrets/test.enc.yaml created encrypted by "node scripts/secret.mjs set" If you use Claude Code, also create CLAUDE.md containing the single line: @AGENTS.md After copying, from the repository root, on macOS or Windows alike: git add --renormalize . (once, after adding .gitattributes) git config core.hooksPath .githooks (once per clone, every person) node scripts/secret.mjs doctor If you added the pre-commit file on Windows, mark it executable for everyone: git update-index --chmod=+x .githooks/pre-commit Before you rely on integration-tests.yml, change "npm run test:integration" to the command your project actually uses, in both the workflow and .claude/settings.json. Tested so far ------------- secret.mjs and the pre-commit hook were tested on macOS with sops 3.13.3, age 1.3.2 and Node 26, using throwaway keys. They have not yet been run on Windows. action.yml and integration-tests.yml have not yet been run in GitHub Actions. Treat those parts as a careful starting point, and test them in your own repository before you depend on them.