Skip to content

Conversation

@chickenandpork
Copy link
Owner

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.

@chickenandpork chickenandpork force-pushed the feature/demo_env_from_yaml branch from 744910e to 58b01c8 Compare October 25, 2023 16:55
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.

1 participant