docs: clarify .env.example is not auto-loaded#2
Merged
Conversation
Nothing in the CLI loads a .env file: the settings layer reads os.environ directly (no dotenv dependency, by design). The old header said "Copy to .env for local use", which invites a silent failure — values placed in .env are never read unless the user exports them. Rewrite the header to state there is no auto-loader and show how to export or source the vars (set -a; . ./.env; set +a). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Rewrites the
.env.exampleheader to state that nothing loads.envautomatically — the settings layer readsos.environdirectly, and there's no dotenv dependency (by design, to keep zero runtime dependencies). Shows how to export or source the vars instead (set -a; . ./.env; set +a).Why
The old header said "Copy to
.envfor local use", which invites a silent failure: a user copies the file, fills inANTHROPIC_API_KEY, runsskeleton-cli ask -p anthropic, and gets a confusing "no API key" error because the file is never read. SECURITY.md already hedged that the file is "only as documentation" — this makes that explicit at the point of use.Keeping the file (rather than deleting it) preserves the near-universal
.env.exampleconvention and the single discoverable list of all five env vars.Scope
Docs only —
.env.exampleheader comment + a matching[Unreleased]CHANGELOG line. No code or behavior change.🤖 Generated with Claude Code