rest-safe-env 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +60 -0
- package/bin/rse.js +2 -0
- package/dist/assets/session-BBsX6ffF.js +9 -0
- package/dist/assets/session-CleYXRaY.css +1 -0
- package/dist/cli.js +1984 -0
- package/dist/session.html +13 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alexandru-Daniel Popescu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# rest-safe-env
|
|
2
|
+
|
|
3
|
+
`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.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This project is built to reduce two common risks:
|
|
8
|
+
|
|
9
|
+
1. Malware scanning plaintext `.env` files.
|
|
10
|
+
2. Accidental secret leakage to LLM tooling (for example by including `.env` content in context or allowing tool-driven `.env` reads).
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- Env editor with full line-preserving behavior (order, comments, blank lines, duplicate keys).
|
|
15
|
+
- Per-value at-rest encryption for `.env` entries.
|
|
16
|
+
- Approval-gated `run` mode for commands that need encrypted values.
|
|
17
|
+
- Import/share flow between machines using an encrypted transfer blob.
|
|
18
|
+
- Local-only UI server with fixed configurable port.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### npm (global)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g rest-safe-env
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then use:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
rse --help
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Homebrew (custom tap)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
brew tap adpopescu338/tap
|
|
38
|
+
brew install rest-safe-env
|
|
39
|
+
# alias also available:
|
|
40
|
+
brew install rse
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
rse view [envFilePath]
|
|
47
|
+
rse import [envFilePath]
|
|
48
|
+
rse run [envFilePath] -- <command...>
|
|
49
|
+
rse config port [port]
|
|
50
|
+
rse cleanup
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Notes:
|
|
54
|
+
|
|
55
|
+
- If `envFilePath` is omitted, `./.env` is used.
|
|
56
|
+
- If a directory is provided, `/.env` inside that directory is used.
|
|
57
|
+
|
|
58
|
+
## Technical Details
|
|
59
|
+
|
|
60
|
+
See `TECHNICAL.md` for architecture, crypto internals, development workflow, and packaging/release details.
|
package/bin/rse.js
ADDED