library("lockbox")
# Export all secrets as environment variables (auto-detects format)
secrets_export(
lockbox = "lockbox.yaml",
private = "private.key"
)
# Now secrets are available as environment variables
Sys.getenv("API_KEY")
Sys.getenv("DATABASE_URL")
Export secrets to environment variables using automatic format detection
Description
Decrypts secrets from a lockbox file and sets them as environment variables in the current R session. Automatically detects whether the file uses SOPS or lockbox format.
Usage
secrets_export(lockbox = NULL, private = NULL)
Arguments
lockbox
|
Character string, path to the encrypted lockbox file |
private
|
Character string, path to private age key file (can be password-protected) |
Value
Invisible character vector of exported variable names