Military-grade AES-256-GCM encryption for .env files. Zero dependencies. Production ready.
# Install
npm install @oxog/env-lock
# Generate encryption key
npx env-lock generate-key
# Encrypt your .env file
npx env-lock encrypt --key YOUR_KEY
# Use in your app
require('@oxog/env-lock').config();
Everything you need to keep your secrets safe
AES-256-GCM authenticated encryption with 256-bit keys
Only native Node.js modules. Minimal attack surface.
Same API as dotenv. Just call config() and go.
Commit encrypted .env.lock safely to version control
171 tests, 99.57% coverage, 100% success rate
Works seamlessly with GitHub Actions, Docker, K8s
Create a cryptographically secure 256-bit key using our CLI tool
Transform your plaintext secrets into an encrypted .env.lock file
Safely version control your encrypted environment variables
Pass the encryption key via environment variable. Your app decrypts automatically.