fix(cli): a project .env provider key gives way only in a received project (#8099)

* fix(cli): a project .env provider key gives way only in a received project

Your own or a cloned project's .env provider keys are used as set again, as
the docs describe. Capture no longer drops a project .env vision key next to
a shell credential, and the audio scripts no longer drop an own project's
Gemini key next to the shell's other Gemini key. A received project's keys
still give way to your own credential, and the notes that name a project
key when it is used stay.

* test(cli): check the note for a cloned project's key; say when a received key is ignored
This commit is contained in:
Michael Wang
2026-11-18 22:45:29 +00:00
committed by GitHub
parent 3229c3a8da
commit 8ace95ce94
9 changed files with 72 additions and 169 deletions
+2 -2
View File
@@ -153,10 +153,10 @@ to a shared space with `--space`.
| `HYPERFRAMES_ENV` | `prod` (default) or `dev`; `dev` keeps credentials in a separate `dev/` directory under the root. Hosts and the OAuth client id come from `HEYGEN_API_URL`, `HYPERFRAMES_OAUTH_*` and `HYPERFRAMES_PUBLISHED_PROJECTS_API_URL`. |
| `HYPERFRAMES_OAUTH_CLIENT_ID` | Override the public client ID for a controlled OAuth environment. |
| `ELEVENLABS_API_KEY` | ElevenLabs TTS, used when no HeyGen credential is present. A key from a received project's `.env` is never used next to your own HeyGen credential. A note names the file whenever a project `.env` key is used. |
| `GEMINI_API_KEY` / `GOOGLE_API_KEY` | Explicit Gemini TTS selection and Lyria music generation; capture descriptions use `GEMINI_API_KEY`. In speech and music, one from a project's `.env` gives way to the other set in your shell. A note names the file whenever a project `.env` key is used. |
| `GEMINI_API_KEY` / `GOOGLE_API_KEY` | Explicit Gemini TTS selection and Lyria music generation; capture descriptions use `GEMINI_API_KEY`. One from a received project's `.env` is ignored when you set a competing credential yourself: in the CLI, the other Gemini key, a Google service account, OpenRouter or Vertex; in the media-use audio scripts, the other Gemini key or a Google service account. A note names the file whenever a project `.env` key is used. |
| `GOOGLE_APPLICATION_CREDENTIALS` / `GCS_CREDS` | Gemini TTS service-account JSON file path / injected JSON. Used when neither API key is set. |
| `GOOGLE_CLOUD_PROJECT` / `GCLOUD_PROJECT_ID` | Gemini OAuth quota project; first set value wins, then the service account project. |
| `OPENROUTER_API_KEY` | Capture descriptions; takes priority over Gemini for that step, unless it comes from a project's `.env` and your shell has a complete Gemini or Vertex credential. A note names the file whenever a project `.env` key is used. |
| `OPENROUTER_API_KEY` | Capture descriptions; takes priority over Gemini for that step. One from a received project's `.env` gives way to your own Gemini or Vertex credential. A note names the file whenever a project `.env` key is used. |
## Related topics
+4 -6
View File
@@ -404,12 +404,10 @@ For AI image descriptions, set `GEMINI_API_KEY` in a `.env` file
[OpenRouter](https://openrouter.ai) — it wins if both are set, and
`HYPERFRAMES_OPENROUTER_MODEL` overrides the model.
A project's `.env` never replaces a vision credential you set in your shell:
when your shell holds a complete credential for another vision provider,
capture ignores the `.env` vision key, with a note naming the file.
Model and timeout settings in the `.env` still apply. A received project's
`.env` (one its received-files record lists) also gives way to your own
project's `.env`, for every command. When capture or `snapshot --describe` uses
A received project's `.env` (one its received-files record lists) never
replaces a vision or Gemini credential you set in your shell or your own
project's `.env`: its competing keys are ignored, with a note naming the file.
Keys in your own or a cloned project's `.env` are used as set. When capture or `snapshot --describe` uses
a vision key from a project's `.env`, a note naming the file prints before the
first request.