You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: clarify .env is for CLI only, not deployed endpoint env
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
* docs: address PR review feedback on env var examples
- 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
* docs: standardize os.environ for deploy-time env examples
- Use os.environ["KEY"] consistently across all files (loud KeyError
on missing vars is better UX than silently passing None via getenv)
- Convert CONTRIBUTING.md bullets to blockquote callout
- Fix duplicate step numbering in troubleshooting.md
Copy file name to clipboardExpand all lines: CLI-REFERENCE.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -839,12 +839,14 @@ export FLASH_PORT=9000
839
839
840
840
**.env file:**
841
841
```bash
842
-
# .env (loaded automatically by Flash)
842
+
# .env (loaded into os.environ for CLI and local development)
843
843
RUNPOD_API_KEY=your-key-here
844
844
FLASH_HOST=0.0.0.0
845
845
FLASH_PORT=8888
846
846
```
847
847
848
+
> **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 file name to clipboardExpand all lines: docs/cli/commands.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,15 +329,17 @@ This hybrid approach enables rapid development: iterate on your orchestration lo
329
329
330
330
### Environment Variables
331
331
332
-
Variables can be set in `.env` file or exported in shell:
332
+
Variables can be set in `.env` file or exported in shell. The `.env` file populates `os.environ` for local CLI use and development -- it is not carried to deployed endpoints.
333
333
334
334
```bash
335
-
# .env file
335
+
# .env file (local CLI and development only)
336
336
FLASH_HOST=0.0.0.0
337
337
FLASH_PORT=9000
338
338
RUNPOD_API_KEY=your-key-here
339
339
```
340
340
341
+
> To pass env vars to deployed endpoints, declare them on the resource config: `env={"HF_TOKEN": os.environ["HF_TOKEN"]}`.
Alternatively, set `RUNPOD_API_KEY` in your environment or a `.env` file for local CLI use:
75
+
78
76
```bash
77
+
# .env file (populates os.environ for CLI and local development)
79
78
RUNPOD_API_KEY=your-key-here
80
79
FLASH_HOST=localhost
81
80
FLASH_PORT=8888
82
81
```
83
82
83
+
> **Note:**`.env` values are **not** carried to deployed endpoints. To pass env vars at deploy time, declare them on the resource: `env={"KEY": os.environ["KEY"]}`.
0 commit comments