Repository navigation
fix(cli): a project .env only sets the CLI's own settings - #6565
Open
miguel-heygen wants to merge 2 commits into
Open
miguel-heygen wants to merge 2 commits into
miguel-heygen wants to merge 2 commits into
Conversation
The .env in the working directory could set any environment variable for every command except capture. It now sets only the keys the CLI reads from a project: the HeyGen, ElevenLabs and Figma credentials and the vision keys, models, Vertex settings and timeout. Other keys are ignored, and one stderr line names them.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 117 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
…ect .env key list
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
A project's
.envonly sets the CLI's own settings. The working directory's.envcould set any environment variable for every command exceptcapture; now every command reads the same short list:HEYGEN_API_KEY,HYPERFRAMES_API_KEY,ELEVENLABS_API_KEY,FIGMA_TOKENcapturealready allowed:OPENROUTER_API_KEY,GEMINI_API_KEY,GOOGLE_API_KEY, the Vertex project, service account, location and model, the OpenRouter and Gemini models, andHYPERFRAMES_VISION_TIMEOUT_MSHYPERFRAMES_BROWSER_PATHis deliberately not on the list: a project could point it at any program, so it stays something only the user's own environment sets.A variable already in the environment still wins. Any other key in the file is ignored, and one stderr line names the keys (never their values).
PROJECT_ENV_KEYSinutils/dotEnv.tsis the one list; it replacesCAPTURE_ENV_KEYS, socaptureno longer has its own rule.loadProjectDotEnvis the one loadercli.tscalls. Thecapture-onlyHYPERFRAMES_NO_CAPTURE_DOTENVopt-out is unchanged.Decision needed
The key list is a product call. I built it from the keys the docs say a
.envsupplies plus the vision list; anything a project.envwas setting beyond it stops working and prints the stderr line.Tests
dotEnv.test.tsloads a.envwithNODE_OPTIONS,HTTPS_PROXYandGEMINI_API_KEY: only the API key is set, one line names the other two, and no value is printed. It fails when the allowlist is removed from the loader. The docs page for the CLI gets one paragraph.