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.
Files changed (2) hide show
  1. package/README.md +52 -24
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,44 +1,72 @@
1
- **Asyq** generates a `.env.example` file by scanning your project for real environment variable usage. It creates a single source of truth for your team without guessing secrets.
1
+ # Asyq
2
2
 
3
- ## Installation & Usage
3
+ Automatically generate `.env.example` files by scanning your codebase for environment variable usage.
4
4
 
5
- First, install it as a development dependency:
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
- then, run the initialization command:
15
+ ## Usage
17
16
 
18
17
  ```bash
19
18
  npx asyq init
20
-
21
19
  ```
22
20
 
23
- ## How It Works
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
- 1. **Scan:** Analyzes codebase for `process.env`, `import.meta.env`, and `${VAR}` usage.
26
- 2. **Detect:** Identifies only variables that are actually used.
27
- 3. **Generate:** Creates a clean `.env.example` file.
46
+ ## Examples
28
47
 
29
- - **Default Mode:** Lists variable names only.
30
- - **AI Mode:** Adds descriptions and safe example values using LLMs.
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
- ## OpenAI API Key Security
58
+ # Custom output
59
+ npx asyq init --out .env.template
33
60
 
34
- If you choose **AI Mode**, an OpenAI API key is required.
61
+ # Scan specific directory
62
+ npx asyq init --root ./packages/api
63
+ ```
35
64
 
36
- - **Input:** Reads from the `OPENAI_API_KEY` environment variable (recommended) or an interactive prompt.
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
- ## Key Options
67
+ ```bash
68
+ export OPENAI_API_KEY=sk-...
69
+ npx asyq init
70
+ ```
40
71
 
41
- | Command | Description |
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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asyq",
3
- "version": "8.0.10",
3
+ "version": "8.0.12",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "env",