Using vvbitwarden to Retrieve Secrets from Bitwarden"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

vvbitwarden 🚀🔒

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. 🔐✨

Prerequisites ⚠️

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.

Installation 💻

To install the development version from GitHub:

# Install devtools if needed
install.packages("devtools")

# Install the package
devtools::install_github("vusaverse/vvbitwarden")

Retrieving a Secret 🔑

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")

Function Arguments

Return Value

The function returns the value of the secret as a character string.

License

This package is licensed under the MIT License.



Try the vvbitwarden package in your browser

Any scripts or data that you put into this service are public.

vvbitwarden documentation built on April 12, 2025, 1:15 a.m.