@@ -79,22 +79,58 @@ It writes non-secret selectors to `~/.config/uinaf/devbox.env` and machine
7979credentials to ` ~/.config/uinaf/infisical-machine.env ` . Both files must be mode
8080` 0600 ` . The helper refuses to continue when the Infisical CLI has an
8181authenticated human ` user ` session and verifies the machine identity can mint a
82- token before writing config. It does not persist a default secret path ; paths
83- belong at the command boundary.
82+ token before writing config. It does not persist secret paths ; paths belong at
83+ the command boundary.
8484
85- Routine command-boundary use:
85+ Routine command-boundary use gives one child command a short-lived machine
86+ token and the configured Infisical project selectors:
8687
8788``` sh
88- INFISICAL_SECRET_PATH=/example-devbox/runtime-env \
89- ./scripts/secrets/infisical-devbox-run.sh -- < runtime-command>
89+ ./scripts/secrets/infisical-devbox-run.sh -- < repo-owned-secret-command>
9090```
9191
92- Replace ` <runtime-command> ` with the service or setup command that knows how to
93- read Infisical. Dotfiles does not generate runtime env files.
92+ The child command receives ` INFISICAL_TOKEN ` , ` INFISICAL_DOMAIN ` ,
93+ ` INFISICAL_PROJECT_ID ` , and ` INFISICAL_ENV ` . If the caller sets
94+ ` INFISICAL_SECRET_PATH ` , the runner forwards it too. Dotfiles does not render
95+ app env, generate runtime dotenv files, or know another repo's secret path.
9496
95- Do not create additional hidden helper scripts, token caches, shell exports, or
96- runtime dotenv refresh stacks outside this contract. If another unattended
97- refresh mechanism becomes necessary, document and verify that mechanism first.
97+ Repo-local setup example:
98+
99+ ``` sh
100+ INFISICAL_SECRET_PATH=/example-repo/runtime \
101+ ~ /projects/uinaf/dotfiles/scripts/secrets/infisical-devbox-run.sh -- \
102+ make secrets-setup
103+ ```
104+
105+ The target repo owns ` make secrets-setup ` : it may run ` infisical export ` , use
106+ ` infisical run ` , write an ignored ` 0600 ` local file, or avoid disk entirely.
107+
108+ OpenClaw-shaped example:
109+
110+ ``` sh
111+ INFISICAL_SECRET_PATH=/example-devbox/openclaw-env \
112+ ~ /projects/uinaf/dotfiles/scripts/secrets/infisical-devbox-run.sh -- \
113+ openclaw < env-render-or-run-command>
114+ ```
115+
116+ The real OpenClaw path and command belong in the workspace or OpenClaw docs,
117+ not in this public repo.
118+
119+ Small ` AGENTS.md ` snippet for a repo that frequently needs runtime secrets:
120+
121+ ``` md
122+ ## Secrets
123+
124+ On agent devboxes, use Infisical through the dotfiles runner:
125+
126+ ` INFISICAL_SECRET_PATH=/this-repo/runtime ~/projects/uinaf/dotfiles/scripts/secrets/infisical-devbox-run.sh -- make secrets-setup `
127+
128+ Do not use 1Password, workspace ` .env ` symlinks, or committed/generated secret
129+ files for agent runtime env.
130+ ```
131+
132+ Do not add dotfiles scripts that render another repo's secrets. If a consumer
133+ repo needs a better secret setup flow, add the wrapper to that repo.
98134
99135If setup fails with ` Invalid credentials ` , check that the ID came from the
100136Universal Auth method. The machine identity ID in the details panel is not a
0 commit comments