Helper for saving an env var
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.
I like this idea a lot! It might also be useful to have an open argument that defaults to TRUE (which just calls edit_r_environ()) to nudge people into understanding the process a bit better.