env-safe-sync
v1.0.0
Published
Secure .env sync CLI for teams
Readme
ENV-SAFE-SYNC
Secure CLI tool to encrypt, share, and restore .env files across teams.
env-safe-sync helps developers safely share environment variables between projects or teammates without exposing sensitive secrets in plain text.
The package is accessible from
Features
- AES-256 ( Advanced Encryption Standard ) encryption for
.envfiles - Share encrypted environment files among teams
- Pull & restore original
.env - Validate missing environment variables
- Simple CLI usage for teams & projects
Installation
Install globally from npm
npm install -g env-safe-syncUsage
Get all Commands
env-safe-syncEncrypt and save .env
env-safe-sync pushCustom output filename:
env-safe-sync push my.env.encNote:
- Now this encrypted files can be shared across teams or projects.
Decrypt and restore .env
env-safe-sync pullFrom custom encrypted file:
env-safe-sync pull my.env.encValidate environment variables
env-safe-sync validateChecks for missing or undefined variables in your project.
🛠️ How It Works
- Reads
.envfile from your project - Encrypts content using AES-256-CBC
- Saves encrypted output file
- Allows secure sharing with teammates
- Restores original
.envwhen needed
Project Structure
env-safe-sync/
│
├── bin/ # CLI entry point
├── index.js
├── src/ # Core logic
├── decrypt.js # For decrypting files sent by members
├── encrypt.js # For encrypting env files
├── envParser.js # For detecting all availbale env files in the directory
├── sync.js # Pull and push logic is implemented here
├── validate.js # To check for missing env values
├── package.json
└── README.md🔐 Security Note
- Uses AES-256 encryption
- Do not commit decrypted
.envto GitHub - Share only encrypted files within trusted teams or members
Author
- Engineering Student
- Full-Stack & ML Enthusiast
- Open-source learner
License
ISC License
Support
If you like this project:
- Star the GitHub repo
- Use it in your projects
- Share your honest feedback
Future Improvements
- Password-based encryption prompt
- Role Based Access or Time Based Permissions
- Cloud sync support
- Team key management
- GUI dashboard
Made with ❤️ by Pranava Pai N
