Securely encrypt your
.envfiles.
Commit them fearlessly. Share them safely.
Managing environment variables in a team is often a headache:
- ❌ Sending
.envvia Slack/DM is insecure - ❌ Machine dies = local configs gone forever
- ❌
.gitignorekeeps secrets safe, but nobody knows what keys are required
wc-envc solves this. Encrypt the values, keep the keys readable. Commit .env.enc to Git. Team pulls, decrypts with shared password, done.
- 🔒 AES-256 Encryption - Industry-standard security
- 👁️ Partial Encryption - Only values encrypted, keys readable
- 🚀 Interactive Mode - Auto-scans for
.envfiles, multi-select support - 📝 Auto .gitignore - Prompts to add source files after encryption
- 🔐 Secure Password - Uses
SecretString(memory zeroized after use) - 🌐 Permanent System Env -
setenvcommand to export variables to system permanently - 🤖 CI/CD Friendly - Non-interactive mode + env var support
- 🦀 Written in Rust - Fast, lightweight, cross-platform
Download the latest release from GitHub Releases.
Add to PATH:
# Windows (PowerShell - run as Admin)
# Move wc-envc.exe to a folder, e.g., C:\Tools\
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Tools", "Machine")# Linux/macOS
chmod +x wc-envc
sudo mv wc-envc /usr/local/bin/Requires Rust installed.
git clone https://github.com/gincanhviet/wc-envc.git
cd wc-envc
cargo install --path .
# Binary auto-added to ~/.cargo/bin (already in PATH)wc-envc encrypt # Encrypt .env files
wc-envc decrypt # Decrypt .env.enc filesExport variables from a .env file to your system permanently:
wc-envc setenv # Interactive mode
wc-envc setenv .env.staging # Direct file mode- Windows: Adds to User Environment Variables (via Registry/setx).
- Unix: Appends to
~/.bashrcor~/.zshrc.
What happens:
- Scans directory for
.envfiles - Select files (All / Individual / Quit)
- Enter password (with confirmation for encrypt)
- Files encrypted → prompts to add to
.gitignore - Done!
# Encrypt
wc-envc encrypt -p "password" -i .env -o .env.enc -y
# Decrypt
wc-envc decrypt -p "password" -i .env.enc -o .env -yexport WC_ENVC_PASSWORD="password"
wc-envc encrypt -i .env -o .env.enc -yPassword priority: -p flag > WC_ENVC_PASSWORD > interactive prompt
- Alice updates
.env→ runswc-envc encrypt→ commits.env.enc - Bob pulls → runs
wc-envc decrypt(shared password) → local.envupdated
- Language: Rust 🦀
- CLI:
clap - Encryption:
magic-crypt(AES-256) - Security:
secrecy(zeroize memory) - UI:
dialoguer&console
Made with ❤️ by WorkCloud.vn
