Claude assisted cleanup

This commit is contained in:
2026-02-23 23:44:21 -05:00
parent d11167b345
commit 995b7c4070
34 changed files with 925 additions and 282 deletions

View File

@@ -21,9 +21,22 @@ if [[ -z "$VAULT_ID" ]]; then
exit 1
fi
# Skip silently for the default vault ID (no named vault to look up)
if [[ "$VAULT_ID" == "default" ]]; then
exit 0
fi
ITEM_NAME="${VAULT_ID} vault key"
FIELD_NAME="password"
# Skip silently if 1Password is not available or not authenticated
if ! command -v op &>/dev/null; then
exit 0
fi
if [[ -z "$OP_SERVICE_ACCOUNT_TOKEN" && -z "$OP_CONNECT_HOST" && ! -S "${HOME}/.1password/agent.sock" ]]; then
exit 0
fi
# Fetch the vault password from 1Password
VAULT_PASSWORD=$(op item get "$ITEM_NAME" --fields "$FIELD_NAME" --format=json --vault LabSecrets 2>/dev/null | jq -r '.value')