"""Checks, sets or purges one secret in the machine configs of a Werkator host or in a local env file. Usage: python3 host_secret.py check|set|purge|export KEY [FILE] < {"sha256": "", "value": "", "old_sha256": ""} Without FILE, it handles ~/*/.git/werkator/.werkator.yml (lines "KEY: value"); with FILE, that env file (lines "KEY=value"). check: tells per file whether the value of KEY has the SHA-256 sha256, and counts the backups that hold that value. A backup it cannot read or parse may hold it too: check names it and exits with 2, and purge refuses. set: replaces the value of KEY in each file that has KEY, after a backup .bak-secret--