e2r
v1.0.2
Published
Encrypt-decrypt files with special extension `.e2rc` (End-to-End Encrypted Resource).
Readme
e2r
🔐 A secure CLI to encrypt & decrypt
.env-style files using end-to-end encryption. Simple. Offline-first. Linux & macOS supported.
Features
- Encrypt & decrypt
.env/.e2rcfiles using Fernet (AES-128) - Remote decryption from raw GitHub URLs (e.g. for CI/CD secrets)
- Output stored cleanly in
~/.e2r/with SHA-256 naming - Fernet key managed locally in
~/.e2r/.config.json - Built with Node.js – no external dependencies
- Run directly using
npxor install vianpm
Installation & Usage
Option 1: Use with npx (no install needed)
npx nzingx/e2r enc path/to/.env
npx nzingx/e2r dc path/to/.e2rc
npx nzingx/e2r dc --gh https://raw.githubusercontent.com/user/repo/main/file.e2rcOption 2: Install globally
npm install -g github:nzingx/e2r
e2r enc my.env
e2r dc my.e2rcOutput Structure
~/.e2r/
├── .decrypted/ # Decrypted output files
├── .encrypted/ # Encrypted files (e2rc)
├── .temp/ # Backup of original files
└── .config.json # Contains Fernet keyExample .env File
USERNAME=user_cc99
API_KEY=xxxxx
DB_PASSWORD=P@ssw0rd
SERVICE_URL=https://api.example.comDeveloper Notes
- Encryption based on Fernet (AES-128 CBC + HMAC-SHA256)
- Secure SHA-256 naming:
.result.<sha>.e2rc - Supports
--debugand.gitignore-style filters (planned)
License
MIT © nzingx
