Repository navigation
Replies: 3 comments
|
Thanks for the suggestion. This didn't exist, so I put it together in #1031. It's called [daemons.api]
run = "npm run server"
env_file = [".env", ".env.local"]
env = { NODE_ENV = "development" }
Files are read when the daemon starts, so secrets never get written into AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable. |
0 replies
|
Implemented in #1031: feat(config): add env_file to load daemon env from dotenv files |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This should be small, but famous last words...
If there is already a way to handle this, feel free to stop me right here.
At the moment, I do not see a way to pull environment variable settings from a .env.local file. The concern is that there are always a few environment variables that contain application secrets. If those live in the pitchfork config file, then the config file cannot be committed to gtihub. This is more or less the use case for .env.local files.
Offhand, a first attempt would be to add env_from = file_path, where file_path points to a .env.local file.
Second stage, which may not be needed, would be to honor {{ }} when processing the environment file contents so that port numbers assigned by pitchfork can be added to environment variable strings. Items referenced inside {{}} must respect dependency order to ensure they are defined at time of expansion.
I haven't looked at the code that supports the current env command, but offhand I think I'd be willing to do the work and set up a pull request if there is interest.
All reactions