reload_env: Reload project-level environment variables

View source: R/utils_env.R

reload_envR Documentation

Reload project-level environment variables

Description

Forces R to re-read the .Renviron file without restarting the session. This is useful when you've modified .Renviron and don't want to restart R.

Usage

reload_env(path = ".Renviron")

Arguments

path

Path to .Renviron file (default: project root)

Value

Invisible TRUE if successful

Examples


if (interactive()) {
# Reload environment after modifying .Renviron
reload_env()
# Now use the new keys
Sys.getenv("OPENAI_API_KEY")
}


aisdk documentation built on May 29, 2026, 9:07 a.m.