#!/usr/bin/env bash # Usage: tools/rotate-secret [-h] check [] # tools/rotate-secret [-h] set (the new value on stdin) # tools/rotate-secret [-h] purge # tools/rotate-secret [-h] fetch # tools/rotate-secret [-h] digest # tools/rotate-secret [-h] probe [-] (with "-" the value on stdin) # # Handles one secret, e.g. GITEA_BOT_TOKEN, in ~//.git/werkator/.werkator.yml of each repository # on the Werkator host that has it, and in the local secrets file # $WERKREVISOR_SECRETS_ENV, by default ~/.config/ai-coding-agents/secrets.env. # check tells per repository whether the value has the SHA-256 , by default that of the secrets file, # and how many backups hold that value. # set replaces the value everywhere, after a backup .bak-secret--