Skip to content

Helper for saving an env var #2201

@hadley

Description

@hadley

In my recent LLM workshop, folks had a hard time following by instructions to add environment variables to .Renviron. This is possible due to my poor instructions, but I think it would be useful to have a helper that could add a new value. The signature would look something like like use_env_var("API_KEY") and the value would be captured using {askpass} or similar.

This would mainly be aimed at people who don't have a lot in the env var (e.g. in my workshop I didn't see anyone with an existing .Renviron) so would need relatively little intelligence. I I think it would be reasonable to start by just appending a newNAME=value line at the bottom of the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions