Quick Start
Prerequisites
Section titled “Prerequisites”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)
Installation
Section titled “Installation”Quick Install (Recommended)
Section titled “Quick Install (Recommended)”make installThis command will:
- Copy helper scripts to
~/.config/direnv/lib - Install the
bwenvCLI to~/.local/bin(Unix/macOS) or%USERPROFILE%\.local\bin(Windows) - Make everything executable
Setup PATH (Linux/macOS)
Section titled “Setup PATH (Linux/macOS)”# 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:
source ~/.bashrc # or ~/.zshrcFirst Use
Section titled “First Use”1. Test Your Installation
Section titled “1. Test Your Installation”bwenv testThis will verify:
- All dependencies are installed
- Bitwarden CLI is working
- direnv is properly configured
2. Initialize Secrets for Your Project
Section titled “2. Initialize Secrets for Your Project”Navigate to your project directory and run:
bwenv initThis will:
- Prompt you for a Bitwarden folder name
- Unlock your Bitwarden vault (if needed)
- Generate a
.envrcfile with your secrets - Show you the next steps
3. Activate Environment Variables
Section titled “3. Activate Environment Variables”direnv allowYour secrets are now loaded as environment variables! Test with:
echo $YOUR_SECRET_VARIABLEAlternative: Interactive Mode
Section titled “Alternative: Interactive Mode”If you prefer to select from a list of folders:
bwenv interactiveThis will display all your Bitwarden folders and let you pick by number.
Debug Options
Section titled “Debug Options”Need to troubleshoot? Use debug modes:
# Show processing steps only (default)bwenv init
# Show steps and actual secret valuesbwenv --debug=2 init
# Silent modebwenv --quiet initNext Steps
Section titled “Next Steps”- Learn about Installation options
- Explore Usage examples
- Check out Configuration options