@griv/env2 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/README.md +98 -0
  2. package/package.json +13 -13
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # @griv/env2
2
+
3
+ Ephemeral encrypted `.env` sharing. Zero-knowledge — the server never sees your secrets.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i -g @griv/env2
9
+ ```
10
+
11
+ ## Share
12
+
13
+ ```bash
14
+ env2 share
15
+ ```
16
+
17
+ ```
18
+ ◆ Select files to share
19
+ │ ✓ .env (12 vars)
20
+ │ ✓ apps/web/.env (8 vars)
21
+ │ ✓ apps/api/.env (3 vars)
22
+
23
+ ◆ .env (12 vars)
24
+ │ ✓ DATABASE_URL
25
+ │ ✓ DATABASE_POOL_SIZE
26
+ │ ✓ REDIS_URL
27
+
28
+ ◇ Encrypting and uploading...
29
+ ✔ Encrypted 3 file(s) — expires 15min, 1 download(s)
30
+ │ https://env2.dev/s/abc123#aB3xK9mP...
31
+
32
+ ◇ Copy URL to clipboard?
33
+ └ Copied! Share it with your teammate.
34
+ ```
35
+
36
+ ## Receive
37
+
38
+ ```bash
39
+ env2 receive https://env2.dev/s/abc123#key
40
+ ```
41
+
42
+ ```
43
+ ◇ Fetching...
44
+ ◆ Decrypted 3 file(s).
45
+
46
+ ◆ .env (12 vars)
47
+ │ ✓ DATABASE_URL
48
+ │ ✓ DATABASE_POOL_SIZE
49
+ │ ✓ REDIS_URL
50
+
51
+ │ .env ⚠ merge (file exists)
52
+ │ apps/web/.env ← new
53
+ │ apps/api/.env ← new
54
+
55
+ ◇ Proceed?
56
+ └ Wrote 3 file(s).
57
+ ```
58
+
59
+ Existing `.env` files are merged — your local vars are preserved, shared vars are added or updated.
60
+
61
+ ## Commands
62
+
63
+ ### `env2 share`
64
+
65
+ | Flag | Description | Default |
66
+ |------|-------------|---------|
67
+ | `--ttl <duration>` | Expiry (e.g. `5m`, `15m`, `1h`) | `15m` |
68
+ | `--downloads <n>` | Max downloads | `1` |
69
+ | `--root <path>` | Working directory | `.` |
70
+ | `--host <url>` | Custom server URL | configured host |
71
+ | `--no-interactive` | Skip pickers, share all | `false` |
72
+
73
+ ### `env2 receive <url>`
74
+
75
+ | Flag | Description | Default |
76
+ |------|-------------|---------|
77
+ | `--root <path>` | Write relative to this dir | `.` |
78
+ | `--dry-run` | Preview without writing | `false` |
79
+ | `--force` | Skip confirmation prompts | `false` |
80
+ | `--overwrite` | Replace files instead of merging | `false` |
81
+ | `--no-interactive` | Accept all vars | `false` |
82
+ | `--stdout` | Print to stdout | `false` |
83
+
84
+ ### `env2 config`
85
+
86
+ ```bash
87
+ env2 config set host https://your-server.com # self-hosted server
88
+ env2 config get host # show current
89
+ env2 config reset # back to default
90
+ ```
91
+
92
+ ## Security
93
+
94
+ Secrets are encrypted with AES-256-GCM before leaving your machine. The encryption key is embedded in the URL fragment (`#...`) which is never sent to the server per the HTTP spec. Shares self-destruct after download.
95
+
96
+ ## License
97
+
98
+ MIT — [GitHub](https://github.com/lucaschrng/env2)
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
1
  {
2
2
  "name": "@griv/env2",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Ephemeral encrypted .env sharing",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/lucaschrng/env2"
9
+ "url": "git+https://github.com/lucaschrng/env2.git"
10
10
  },
11
11
  "bin": {
12
- "env2": "./dist/index.js"
12
+ "env2": "dist/index.js"
13
13
  },
14
14
  "files": [
15
15
  "dist"
16
16
  ],
17
+ "scripts": {
18
+ "build": "tsup src/index.ts --format esm --dts --clean",
19
+ "lint": "eslint .",
20
+ "lint:fix": "eslint . --fix",
21
+ "typecheck": "tsc --noEmit"
22
+ },
17
23
  "dependencies": {
18
24
  "@clack/prompts": "^0.10",
25
+ "@env2/crypto": "workspace:*",
26
+ "@env2/types": "workspace:*",
19
27
  "clipboardy": "^5.3.1",
20
- "commander": "^13",
21
- "@env2/types": "0.0.0",
22
- "@env2/crypto": "0.0.0"
28
+ "commander": "^13"
23
29
  },
24
30
  "devDependencies": {
25
31
  "@types/node": "^22",
26
32
  "tsup": "^8.5.1",
27
33
  "typescript": "^5"
28
- },
29
- "scripts": {
30
- "build": "tsup src/index.ts --format esm --dts --clean",
31
- "lint": "eslint .",
32
- "lint:fix": "eslint . --fix",
33
- "typecheck": "tsc --noEmit"
34
34
  }
35
- }
35
+ }