Utility helper to manage the `HF_TOKEN` environment variable used for authenticated downloads from Hugging Face. The token is set for the current R session, and it can optionally be persisted to a `.Renviron` file for future sessions. The token is not printed back to the console.
Arguments
- token
Character scalar. Your Hugging Face access token, typically starting with `hf_`.
- persist
Logical flag controlling whether to persist the token to a startup file. Defaults to `FALSE`.
- renviron_path
Optional path to the `.Renviron` file to update when `persist = TRUE`. Must be supplied explicitly when persisting.