Created
October 23, 2025 08:24
-
-
Save claui/fa8a8a65743e6406094bf21d52cf6c6f to your computer and use it in GitHub Desktop.
op-vault-client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -eu -o pipefail | |
| if [ "${SKIP_VAULT_PASSWORD:-0}" -ne '0' ]; then | |
| printf '\0' | |
| exit 0 | |
| fi | |
| if [ "$(op --version | cut -d . -f 1)" -le '1' ]; then | |
| set -- op get item | |
| elif [ "$(op --version | cut -d . -f 1)" -eq '2' ] \ | |
| && [ "$(op --version | cut -d . -f 2)" -lt '30' ] | |
| then | |
| set -- op item get | |
| else | |
| set -- op item get --reveal | |
| fi | |
| exec "$@" --vault=?????? \ | |
| ?????? --fields password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment