secrets: rename the vault helpers from env* to op*
They act on 1Password, not on the environment, so the prefix now says so: opr (read), opc (create/update), opd (delete), opl (list), ops (refresh). No behavior change. Checked the new names don't collide with any command or oh-my-zsh alias, and verified opr/opl/ops against the real vault (values compared, not printed). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -6,19 +6,19 @@
|
||||
# field on EVERY new shell. That made each terminal wait on 1Password, broke
|
||||
# every shell when the network or the service account was down, and meant each
|
||||
# box carried its own hand-written copy of the loop. Now the vault is read once
|
||||
# here (at bootstrap, or on demand with `envs`), and shells read a local file.
|
||||
# here (at bootstrap, or on demand with `ops`), and shells read a local file.
|
||||
#
|
||||
# Layout: one vault per user (default: the login name), holding one item
|
||||
# (default: also the login name) whose field LABELS are the variable names —
|
||||
# GITEA_KEY, LITELLM_KEY, PROXMOX_TOKEN_SECRET, ... Every such field is
|
||||
# exported. Add a secret by adding a field (`envc NAME`), not by editing
|
||||
# exported. Add a secret by adding a field (`opc NAME`), not by editing
|
||||
# this repo.
|
||||
#
|
||||
# Files, all under ~/.config/dotfiles (0700), none in the repo:
|
||||
# op.env OP_SERVICE_ACCOUNT_TOKEN, OP_VAULT, OP_ITEM (0600). Kept so a
|
||||
# refresh needs no prompt. Deliberately NOT sourced by shells:
|
||||
# the token stays out of every process's environment, and only
|
||||
# the env* helpers in zsh/zshrc load it, in a subshell.
|
||||
# the op* helpers in zsh/zshrc load it, in a subshell.
|
||||
# secrets.env the exported fields (0600), replaced atomically, so a failed
|
||||
# fetch leaves the previous copy in place.
|
||||
#
|
||||
@@ -115,7 +115,7 @@ _tmp="$(mktemp "$CONF_DIR/secrets.env.XXXXXX")"
|
||||
trap 'rm -f "$_tmp"' EXIT
|
||||
{
|
||||
printf '# Generated by dotfiles secrets/install.sh from op://%s/%s — do not edit.\n' "$OP_VAULT" "$OP_ITEM"
|
||||
printf '# Refresh with: envs (change the vault with: envc NAME / envd NAME)\n'
|
||||
printf '# Refresh with: ops (change the vault with: opc NAME / opd NAME)\n'
|
||||
printf '%s' "$_json" | jq -r '
|
||||
.fields[]
|
||||
| select(.purpose != "NOTES")
|
||||
|
||||
Reference in New Issue
Block a user