env-detector 1.0.0 → 1.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 +51 -10
  2. package/package.json +2 -3
package/README.md CHANGED
@@ -1,25 +1,66 @@
1
- # env-scan
1
+ # env-detector
2
2
 
3
- Automatically generate .env file by scanning process.env usage.
3
+ Smart environment variable analyzer and `.env` generator.
4
4
 
5
- ## Install
5
+ Automatically detects `process.env` usage, generates `.env`, groups environments, detects missing variables, and audits configuration.
6
6
 
7
- npx env-scan
7
+ npx env-detector
8
+ ```
8
9
 
9
- OR
10
-
11
- npm install -g env-scan
10
+ ---
12
11
 
13
12
  ## Usage
14
13
 
15
- env-scan
14
+ ```bash
15
+ env-detector
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Commands
21
+
22
+ | Command | Description |
23
+ |---------|-------------|
24
+ | `env-detector` | Generate `.env` |
25
+ | `env-detector --compare` | Compare env usage |
26
+ | `env-detector --check` | Check missing variables |
27
+ | `env-detector --fix` | Fix unused variables |
28
+ | `env-detector --security` | Security scan |
29
+ | `env-detector --strict` | Strict mode (CI) |
30
+ | `env-detector --ask` | Interactive fill |
31
+
32
+ ---
16
33
 
17
34
  ## Example
18
35
 
36
+ **Code:**
37
+
38
+ ```javascript
19
39
  process.env.DB_HOST
20
40
  process.env.PORT
41
+ ```
21
42
 
22
- Generated:
43
+ **Generated `.env`:**
23
44
 
45
+ ```
24
46
  DB_HOST=
25
- PORT=
47
+ PORT=
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Grouped Config Support
53
+
54
+ If config file contains:
55
+
56
+ ```javascript
57
+ development: {
58
+ username: process.env.DBUSERNAME
59
+ }
60
+ ```
61
+
62
+ Generated:
63
+
64
+ ```
65
+ # development
66
+ DBUSERNAME=
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "env-detector",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Smart .env generator and auditor",
5
5
  "main": "src/scan.js",
6
6
  "bin": {
7
- "env-detector": "./bin/env-scan.js",
8
- "env-scan": "./bin/env-scan.js"
7
+ "env-detector": "./bin/env-scan.js"
9
8
  },
10
9
  "scripts": {
11
10
  "test": "echo \"Error: no test specified\" && exit 1"