feat: demo env from yaml #30
Open
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.
This PR demonstrates setting env variables from a plaintext YAML file.
why?
Many of the ML/LLM tools and features use credentials injected as global environment values; this allows for simple examples of the form
OPENAI_API_KEY=sk-loremipsum... ./run/my/thing, knowing that the libraries used will look to the env for the keys it needs (or ungracefully choke and fail, but that's a different story about clear exception reporting and preflight checks).SOPS has the notion of keeping environment variables in a file that is encrypted in the source tree; this means that boilerplate often either sources that file, tainting the entire environment with all keys and crews in that file, or the same code over and over to pull text values forma file and inject to the env in a wrapper.
Generating that wrapper offers simpler coding, less code to maintain.