asyq 8.0.10 → 8.0.12
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 +52 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,44 +1,72 @@
|
|
|
1
|
-
|
|
1
|
+
# Asyq
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Automatically generate `.env.example` files by scanning your codebase for environment variable usage.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
# Using npm
|
|
9
8
|
npm install -D asyq
|
|
10
|
-
|
|
11
|
-
# Using pnpm
|
|
9
|
+
# or
|
|
12
10
|
pnpm add -D asyq
|
|
13
|
-
|
|
11
|
+
# or
|
|
12
|
+
yarn add -D asyq
|
|
14
13
|
```
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
## Usage
|
|
17
16
|
|
|
18
17
|
```bash
|
|
19
18
|
npx asyq init
|
|
20
|
-
|
|
21
19
|
```
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
Choose between two modes:
|
|
22
|
+
|
|
23
|
+
- **Default** - Fast generation with variable names only
|
|
24
|
+
- **AI-assisted** - Adds descriptions and example values (requires OpenAI API key)
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
|
|
28
|
+
| Command | Description |
|
|
29
|
+
| -------------------------- | --------------------------- |
|
|
30
|
+
| `npx asyq init` | Interactive setup |
|
|
31
|
+
| `npx asyq init --force` | Overwrite existing files |
|
|
32
|
+
| `npx asyq init --monorepo` | Generate for each workspace |
|
|
33
|
+
| `npx asyq init --debug` | Show scan diagnostics |
|
|
34
|
+
|
|
35
|
+
## Options
|
|
36
|
+
|
|
37
|
+
| Option | Description |
|
|
38
|
+
| --------------------- | ----------------------------------------- |
|
|
39
|
+
| `--root <dir>` | Project root to scan (default: `.`) |
|
|
40
|
+
| `--out <file>` | Output filename (default: `.env.example`) |
|
|
41
|
+
| `--force` | Overwrite without confirmation |
|
|
42
|
+
| `--include-lowercase` | Include mixed-case variables |
|
|
43
|
+
| `--debug` | Print detailed diagnostics |
|
|
44
|
+
| `--monorepo` | Generate for root + workspaces |
|
|
24
45
|
|
|
25
|
-
|
|
26
|
-
2. **Detect:** Identifies only variables that are actually used.
|
|
27
|
-
3. **Generate:** Creates a clean `.env.example` file.
|
|
46
|
+
## Examples
|
|
28
47
|
|
|
29
|
-
|
|
30
|
-
|
|
48
|
+
```bash
|
|
49
|
+
# Basic usage
|
|
50
|
+
npx asyq init
|
|
51
|
+
|
|
52
|
+
# Force overwrite
|
|
53
|
+
npx asyq init --force
|
|
54
|
+
|
|
55
|
+
# Monorepo project
|
|
56
|
+
npx asyq init --monorepo
|
|
31
57
|
|
|
32
|
-
|
|
58
|
+
# Custom output
|
|
59
|
+
npx asyq init --out .env.template
|
|
33
60
|
|
|
34
|
-
|
|
61
|
+
# Scan specific directory
|
|
62
|
+
npx asyq init --root ./packages/api
|
|
63
|
+
```
|
|
35
64
|
|
|
36
|
-
|
|
37
|
-
- **Safety:** The key is **never written to disk**, **never logged**, and **only used for the current run**.
|
|
65
|
+
Set your OpenAI API key:
|
|
38
66
|
|
|
39
|
-
|
|
67
|
+
```bash
|
|
68
|
+
export OPENAI_API_KEY=sk-...
|
|
69
|
+
npx asyq init
|
|
70
|
+
```
|
|
40
71
|
|
|
41
|
-
|
|
42
|
-
| ----------------------- | --------------------------------- |
|
|
43
|
-
| `npx asyq init` | Standard interactive setup. |
|
|
44
|
-
| `npx asyq init --force` | Overwrites existing output files. |
|
|
72
|
+
Or enter it when prompted (not saved to disk).
|