LastPass Provider
The LastPass provider integrates with LastPass password manager for secure cloud-based secret storage.
Prerequisites
Section titled “Prerequisites”Install LastPass CLI:
# macOSbrew install lastpass-cli
# Linux (apt)sudo apt install lastpass-cli
# NixOSnix-env -iA nixpkgs.lastpass-cli
Configuration
Section titled “Configuration”URI Format
Section titled “URI Format”# Basiclastpass
# With folder prefixlastpass://folder_namelastpass://Work/Projects
Authentication
Section titled “Authentication”# Standard loginlpass login your-email@example.com
# Trust device (reduces MFA prompts)lpass login --trust your-email@example.com
# CI/CD environmentsexport LPASS_DISABLE_PINENTRY=1echo "password" | lpass login --trust your-email@example.com
# Set a secretsecretspec set DATABASE_URL --provider lastpassEnter value for DATABASE_URL: postgresql://localhost/mydb
# Set with foldersecretspec set API_KEY --provider lastpass://ProductionEnter value for API_KEY: sk-123456
# Get a secretsecretspec get DATABASE_URL --provider lastpass
# Run with secretssecretspec run --provider lastpass -- npm start
# Profile-specific secretssecretspec set DATABASE_URL --profile dev --provider lastpass://Developmentsecretspec set DATABASE_URL --profile prod --provider lastpass://Production
Secrets are stored as: {folder_prefix}/{profile}/{project}/{key}