@envsave/cli 1.0.43 → 1.0.44
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/README.md +68 -17
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,11 +26,11 @@ import { get } from "@envsave/cli";
|
|
|
26
26
|
const openai = new OpenAI({ apiKey: get("es_7a3f2b1e9c8d4f6b2a1c3d5f") });
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
This is the single problem this project is built around. Everything else — the CLI, the license server, the Python bridge, the cloud backup — exists to make opaque-key-based secrets practical to use day to day.
|
|
29
|
+
This is the single problem this project is built around. Everything else — the CLI, the license server, the Python bridge, the Vercel push, the cloud backup — exists to make opaque-key-based secrets practical to use day to day.
|
|
30
30
|
|
|
31
31
|
## Pricing
|
|
32
32
|
|
|
33
|
-
Local personal use is **free and unlimited** — store as many secrets as you want with no license. A license is only
|
|
33
|
+
Local personal use is **free and unlimited** — store as many secrets as you want, on as many machines as you want, with no license required. A license is only needed to sync your vault to the EnvSave cloud (backup / restore / sync across machines). Activate one with `envsave activate <token>` — get yours at https://envsave.com.
|
|
34
34
|
|
|
35
35
|
## Installation
|
|
36
36
|
|
|
@@ -48,8 +48,16 @@ Python users:
|
|
|
48
48
|
pip install envsave
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
Check the installed version any time:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
envsave --version
|
|
55
|
+
```
|
|
56
|
+
|
|
51
57
|
## Activation
|
|
52
58
|
|
|
59
|
+
Activation is only required for cloud sync. Local use works without it.
|
|
60
|
+
|
|
53
61
|
### Online (production)
|
|
54
62
|
|
|
55
63
|
Requires the license server running at `https://api.envsave.com`.
|
|
@@ -92,12 +100,12 @@ You'll be prompted to set and confirm a master password.
|
|
|
92
100
|
```bash
|
|
93
101
|
envsave set OPENAI_API_KEY sk-abc123
|
|
94
102
|
# Output:
|
|
95
|
-
# OPENAI_API_KEY → es_7a3f2b1e9c8d4f6b
|
|
103
|
+
# Added: OPENAI_API_KEY → es_7a3f2b1e9c8d4f6b
|
|
96
104
|
# Use this in your code to access OPENAI_API_KEY:
|
|
97
105
|
# envsave.get("es_7a3f2b1e9c8d4f6b")
|
|
98
106
|
```
|
|
99
107
|
|
|
100
|
-
The opaque key (`es_...`) is an HMAC-SHA256 hash — no trace of the original key name.
|
|
108
|
+
The opaque key (`es_...`) is an HMAC-SHA256 hash — no trace of the original key name. Re-running `envsave set` on an existing key updates the value in place; the opaque key stays the same, so you don't need to touch any code.
|
|
101
109
|
|
|
102
110
|
## Retrieving Secrets
|
|
103
111
|
|
|
@@ -106,6 +114,9 @@ The opaque key (`es_...`) is an HMAC-SHA256 hash — no trace of the original ke
|
|
|
106
114
|
```bash
|
|
107
115
|
# By opaque key (tries session cache first, then prompts for password)
|
|
108
116
|
envsave get es_7a3f2b1e9c8d4f6b
|
|
117
|
+
|
|
118
|
+
# By clean name (password required — returns the plaintext value)
|
|
119
|
+
envsave show OPENAI_API_KEY
|
|
109
120
|
```
|
|
110
121
|
|
|
111
122
|
### Node.js / Bun
|
|
@@ -131,28 +142,67 @@ api_key = get("es_7a3f2b1e9c8d4f6b")
|
|
|
131
142
|
## Other Commands
|
|
132
143
|
|
|
133
144
|
```bash
|
|
134
|
-
# Show opaque key for a
|
|
135
|
-
envsave reveal OPENAI_API_KEY
|
|
145
|
+
# Show opaque key(s) for any name matching a keyword (password required)
|
|
146
|
+
envsave reveal OPENAI # matches OPENAI_API_KEY, OPENAI_ORG, …
|
|
147
|
+
envsave reveal OPENAI_API_KEY DATABASE_URL # multiple keywords at once
|
|
136
148
|
|
|
137
|
-
#
|
|
138
|
-
envsave
|
|
149
|
+
# Show the real value by clean name (password required)
|
|
150
|
+
envsave show OPENAI_API_KEY
|
|
139
151
|
|
|
140
|
-
#
|
|
152
|
+
# Search clean names without revealing opaque keys (no password if session is warm)
|
|
153
|
+
envsave search openai
|
|
154
|
+
|
|
155
|
+
# Scan the current project for hardcoded env references and opaque keys
|
|
156
|
+
envsave scan [dir]
|
|
157
|
+
|
|
158
|
+
# List all stored key names (password required)
|
|
141
159
|
envsave list
|
|
142
160
|
|
|
143
|
-
# Delete a secret (
|
|
161
|
+
# Delete a secret (password required)
|
|
144
162
|
envsave delete OPENAI_API_KEY
|
|
145
163
|
|
|
146
|
-
# Bulk import from .env file (
|
|
164
|
+
# Bulk import from .env file (password required)
|
|
147
165
|
envsave import .env
|
|
148
166
|
|
|
149
|
-
# Export all secrets as .env format (
|
|
167
|
+
# Export all secrets as .env format (password required)
|
|
150
168
|
envsave export
|
|
169
|
+
|
|
170
|
+
# Change master password
|
|
171
|
+
envsave passwd
|
|
172
|
+
|
|
173
|
+
# Rate limit config (password required to change)
|
|
174
|
+
envsave config # show current
|
|
175
|
+
envsave config --max-gets 120 # set max gets/minute
|
|
176
|
+
|
|
177
|
+
# Show version
|
|
178
|
+
envsave --version
|
|
151
179
|
```
|
|
152
180
|
|
|
181
|
+
## Deploying to Vercel
|
|
182
|
+
|
|
183
|
+
`envsave vercel` pushes selected secrets to a Vercel project so serverless functions and build-time code both work without any `.env` on disk.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# In a directory already linked with `vercel link`
|
|
187
|
+
envsave vercel OPENAI_API_KEY DATABASE_URL
|
|
188
|
+
|
|
189
|
+
# Push by opaque id instead of clean name
|
|
190
|
+
envsave vercel es_7a3f2b1e9c8d4f6b
|
|
191
|
+
|
|
192
|
+
# Restrict to specific environments (default is production, preview, development)
|
|
193
|
+
envsave vercel OPENAI_API_KEY --env production,preview
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Each secret is uploaded under **both** the opaque id (`es_...`) and the clean name (`OPENAI_API_KEY`). That means:
|
|
197
|
+
|
|
198
|
+
- **Build-time / server code** can keep calling `envsave.get("es_7a3f...")` — the opaque id is present as an env var, so no password or vault is needed in the deployed environment.
|
|
199
|
+
- **Runtime serverless functions** that expect `process.env.OPENAI_API_KEY` keep working unchanged.
|
|
200
|
+
|
|
201
|
+
Only the secrets you name on the command line are pushed — the rest of your vault stays local.
|
|
202
|
+
|
|
153
203
|
## Cloud Backup & Sync
|
|
154
204
|
|
|
155
|
-
The encrypted vault can be backed up to the EnvSave cloud server for disaster recovery or syncing across machines. The server only stores the encrypted bytes — it never sees plaintext secrets.
|
|
205
|
+
Requires an active license. The encrypted vault can be backed up to the EnvSave cloud server for disaster recovery or syncing across machines. The server only stores the encrypted bytes — it never sees plaintext secrets.
|
|
156
206
|
|
|
157
207
|
```bash
|
|
158
208
|
# Upload encrypted vault to cloud
|
|
@@ -179,7 +229,7 @@ envsave sync
|
|
|
179
229
|
|
|
180
230
|
```bash
|
|
181
231
|
# 1. Install envsave
|
|
182
|
-
|
|
232
|
+
npm install -g @envsave/cli
|
|
183
233
|
|
|
184
234
|
# 2. Activate with same license token
|
|
185
235
|
envsave activate <token>
|
|
@@ -198,8 +248,9 @@ envsave list
|
|
|
198
248
|
2. Stored at `~/.envsave/vault.enc` (binary: salt + iv + encrypted data + auth tag)
|
|
199
249
|
3. Key names are HMAC-SHA256 hashes — fully opaque, no trace of original name
|
|
200
250
|
4. Session cache stores decrypted secrets in memory — no password needed for repeated reads
|
|
201
|
-
5.
|
|
202
|
-
6.
|
|
251
|
+
5. `envsave get` is rate-limited (configurable via `envsave config --max-gets`) to blunt automated scraping from a compromised session
|
|
252
|
+
6. Optional SSH key adds a "something you have" hardware factor
|
|
253
|
+
7. LLM agents only see opaque keys — they can read values but can't discover or enumerate secrets
|
|
203
254
|
|
|
204
255
|
## License Tokens
|
|
205
256
|
|
|
@@ -219,5 +270,5 @@ When a license token expires, the CLI automatically contacts the server to renew
|
|
|
219
270
|
| File | Purpose |
|
|
220
271
|
|------|---------|
|
|
221
272
|
| `~/.envsave/vault.enc` | Encrypted vault |
|
|
222
|
-
| `~/.envsave/license.json` | Activated license |
|
|
273
|
+
| `~/.envsave/license.json` | Activated license (cloud sync only) |
|
|
223
274
|
| `~/.envsave/session.json` | Session cache (decrypted secrets) |
|
package/dist/cli.js
CHANGED
|
@@ -836,7 +836,7 @@ async function checkLicense() {
|
|
|
836
836
|
// package.json
|
|
837
837
|
var package_default = {
|
|
838
838
|
name: "@envsave/cli",
|
|
839
|
-
version: "1.0.
|
|
839
|
+
version: "1.0.44",
|
|
840
840
|
description: "Local secret vault for LLM-safe environments — encrypted secrets that agents can't bulk-discover",
|
|
841
841
|
type: "module",
|
|
842
842
|
main: "dist/index.js",
|