Skip to content

Quick Start

Before using bwenv, make sure you have:

  • Bitwarden CLI installed and configured
  • direnv installed and set up in your shell
  • jq installed (for JSON processing)
Terminal window
make install

This command will:

  • Copy helper scripts to ~/.config/direnv/lib
  • Install the bwenv CLI to ~/.local/bin (Unix/macOS) or %USERPROFILE%\.local\bin (Windows)
  • Make everything executable
Terminal window
# Automatic setup (recommended)
make setup-path
# Or add manually to your shell config (~/.bashrc, ~/.zshrc, etc.)
export PATH="$HOME/.local/bin:$PATH"

Then restart your terminal or run:

Terminal window
source ~/.bashrc # or ~/.zshrc
Terminal window
bwenv test

This will verify:

  • All dependencies are installed
  • Bitwarden CLI is working
  • direnv is properly configured

Navigate to your project directory and run:

Terminal window
bwenv init

This will:

  1. Prompt you for a Bitwarden folder name
  2. Unlock your Bitwarden vault (if needed)
  3. Generate a .envrc file with your secrets
  4. Show you the next steps
Terminal window
direnv allow

Your secrets are now loaded as environment variables! Test with:

Terminal window
echo $YOUR_SECRET_VARIABLE

If you prefer to select from a list of folders:

Terminal window
bwenv interactive

This will display all your Bitwarden folders and let you pick by number.

Need to troubleshoot? Use debug modes:

Terminal window
# Show processing steps only (default)
bwenv init
# Show steps and actual secret values
bwenv --debug=2 init
# Silent mode
bwenv --quiet init