rest-safe-env
v0.2.1
Published
Encrypt selected .env values at rest and unlock only with explicit local approval.
Readme
rest-safe-env
rest-safe-env protects .env secrets at rest. It lets you encrypt selected values and only decrypts locally after explicit user approval in a browser UI.
Purpose
This project is built to reduce two common risks:
- Malware scanning plaintext
.envfiles. - Accidental secret leakage to LLM tooling (for example by including
.envcontent in context or allowing tool-driven.envreads).
Features
- Env editor with full line-preserving behavior (order, comments, blank lines, duplicate keys).
- Per-value at-rest encryption for
.enventries. - Approval-gated
runmode for commands that need encrypted values. - Import/share flow between machines using an encrypted transfer blob.
- Local-only UI server with fixed configurable port.
Installation
npm (global)
npm install -g rest-safe-envThen use:
rse --helpHomebrew (custom tap)
brew tap adpopescu338/tap
brew install rest-safe-env
# alias also available:
brew install rseVS Code extension (optional)
Install extension adpopescu338.rest-safe-env-vscode to add a right-click action on .env files (View with rest-safe-env) that launches rse view for the selected file.
code --install-extension adpopescu338.rest-safe-env-vscodeUsage
rse --help
rse --version
rse view [envFilePath]
rse import [envFilePath]
rse run [envFilePath] -- <command...>
rse config port [port]
rse cleanupNotes:
- If
envFilePathis omitted,./.envis used. - If a directory is provided,
/.envinside that directory is used.
Technical Details
See TECHNICAL.md for architecture, crypto internals, development workflow, and packaging/release details.
