knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
vvbitwarden
is an R package that provides functions to interact with your Bitwarden Secrets Manager vault. It allows you to securely retrieve secrets stored in your Bitwarden vault. 🔐✨
Before using vvbitwarden
, make sure you have the Bitwarden Secrets Manager CLI (BWS CLI) installed on your system:
👉 Secrets Manager CLI Documentation
You will also need a Bitwarden access token and an initialized vault.
To install the development version from GitHub:
# Install devtools if needed install.packages("devtools") # Install the package devtools::install_github("vusaverse/vvbitwarden")
The get_bws_secret()
function retrieves the value of a secret from your Bitwarden Secrets Manager vault.
library(vvbitwarden) # Retrieve a secret (requires the environment variable BITWARDEN_ACCESS_TOKEN to be set) # or provide it explicitly via the access_token argument # secret_value <- get_bws_secret("my_secret_key") # print(secret_value)
⚠️ For security reasons, we recommend storing your Bitwarden access token in an environment variable:
r Sys.setenv(BITWARDEN_ACCESS_TOKEN = "your_token_here")
key
: A character string representing the key of the secret.access_token
: Optional. Defaults to the "BITWARDEN_ACCESS_TOKEN" environment variable.server_url
: Optional. Defaults to "https://vault.bitwarden.eu"
.The function returns the value of the secret as a character string.
This package is licensed under the MIT License.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.