Skip to content

docs: clarify .env scope for env separation#39

Open
deanq wants to merge 2 commits intomainfrom
deanq/ae-1549-explicit-env-vars
Open

docs: clarify .env scope for env separation#39
deanq wants to merge 2 commits intomainfrom
deanq/ae-1549-explicit-env-vars

Conversation

@deanq
Copy link
Member

@deanq deanq commented Mar 5, 2026

Summary

  • Clarify that .env files populate os.environ for CLI and local dev only, not deployed endpoints
  • Update 6 doc files to recommend flash login as primary auth and explicit env={} for deploy-time vars
  • Companion to flash repo PR for env separation refactor (runpod/flash branch deanq/ae-1549-explicit-env-vars)

Files Changed

File Change
CONTRIBUTING.md Clarify .env is for local CLI use only
CLI-REFERENCE.md Update .env section scope
docs/cli/commands.md Add explicit env={} guidance
docs/cli/getting-started.md Recommend flash login, clarify .env scope
docs/cli/troubleshooting.md Add flash login as primary fix, clarify .env scope
docs/cli/workflows.md Restructure auth section: flash login primary, .env alternative

Test plan

  • Verify docs render correctly on GitHub
  • No code changes, docs only

Update all documentation to reflect env separation:
- .env populates os.environ for CLI and local dev
- Resource env={} is the explicit way to set endpoint env vars
- flash login is the primary auth method
- Deploy-time preview shows what goes to each endpoint
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@deanq deanq requested a review from Copilot March 5, 2026 22:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

- Use os.getenv() instead of os.environ[] in doc examples
- Show both uv run and bare flash login invocations
- Split dense paragraph into scannable bullets in CONTRIBUTING.md
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

docs/cli/troubleshooting.md:694

  • The numbering in this Solutions list is now duplicated (two items labeled "4."). After adding the new recommended flash login step, renumber the remaining items so the list stays sequential.
**4. Get API key:**
1. Visit https://runpod.io/console/user/settings
2. Click "API Keys"
3. Create new key or copy existing
4. Set environment variable

**4. Make persistent (bash/zsh):**
```bash
echo 'export RUNPOD_API_KEY=your-key-here' >> ~/.bashrc

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

FLASH_PORT=8888
```

> **Note:** `.env` values populate `os.environ` locally. They are **not** carried to deployed endpoints. To pass env vars at deploy time, declare them on the resource: `env={"KEY": os.environ["KEY"]}`.
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deploy-time env var example uses os.environ["KEY"], which will raise a KeyError if unset and is inconsistent with the other docs in this PR that use os.getenv(...). Consider switching this example to os.getenv("KEY") for consistency and safer copy/paste.

Suggested change
> **Note:** `.env` values populate `os.environ` locally. They are **not** carried to deployed endpoints. To pass env vars at deploy time, declare them on the resource: `env={"KEY": os.environ["KEY"]}`.
> **Note:** `.env` values populate `os.environ` locally. They are **not** carried to deployed endpoints. To pass env vars at deploy time, declare them on the resource: `env={"KEY": os.getenv("KEY")}`.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants