@writechoice/mint-cli 0.0.8 → 0.0.10

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 CHANGED
@@ -2,396 +2,256 @@
2
2
 
3
3
  CLI tool for Mintlify documentation validation and utilities.
4
4
 
5
- ## Features
6
-
7
- - **Link Validation**: Validates internal links and anchors in MDX documentation files
8
- - **Browser Automation**: Uses Playwright to test links against live websites
9
- - **Auto-Fix**: Automatically fixes incorrect anchor links
10
- - **Detailed Reporting**: Generates JSON reports with validation results
11
- - **Concurrent Processing**: Validates multiple links simultaneously for better performance
5
+ ## Quick Start
12
6
 
13
- ## Installation
14
-
15
- ### Global Installation
7
+ ### Installation
16
8
 
17
9
  ```bash
18
10
  npm install -g @writechoice/mint-cli
11
+ npx playwright install chromium
19
12
  ```
20
13
 
21
- ### Local Development
14
+ ### Usage
22
15
 
23
16
  ```bash
24
- # Clone the repository
25
- git clone <repository-url>
26
- cd writechoice-mint-cli
27
-
28
- # Install dependencies
29
- npm install
30
-
31
- # Install Playwright browsers
32
- npx playwright install chromium
17
+ # Check version
18
+ writechoice --version
33
19
 
34
- # Make CLI executable
35
- chmod +x bin/cli.js
20
+ # Update to latest
21
+ writechoice update
36
22
 
37
- # Link for local development
38
- npm link
39
- ```
23
+ # Validate MDX parsing
24
+ writechoice check parse
40
25
 
41
- ## Usage
26
+ # Validate links
27
+ writechoice check links https://docs.example.com
42
28
 
43
- ### Check Version
29
+ # Validate with local development server
30
+ writechoice check links docs.example.com http://localhost:3000
44
31
 
45
- Check the installed version:
32
+ # Fix broken anchor links
33
+ writechoice fix links
46
34
 
47
- ```bash
48
- writechoice --version
49
- # or
50
- writechoice -v
35
+ # Generate config.json template
36
+ writechoice config
51
37
  ```
52
38
 
53
- ### Update to Latest Version
39
+ ## Commands
40
+
41
+ ### `config`
54
42
 
55
- Update to the latest version from npm:
43
+ Generates a config.json template file with all available options.
56
44
 
57
45
  ```bash
58
- writechoice update
46
+ writechoice config # Create config.json
47
+ writechoice config --force # Overwrite existing config.json
59
48
  ```
60
49
 
61
- The CLI also automatically checks for updates and displays a notification when a new version is available.
50
+ **Output:** Creates `config.json` in the current directory with placeholder values.
62
51
 
63
- ### Validate Links
52
+ ### `check parse`
64
53
 
65
- Validate all internal links and anchors in your MDX documentation:
54
+ Validates MDX files for parsing errors.
66
55
 
67
56
  ```bash
68
- writechoice check links https://docs.example.com
57
+ writechoice check parse # All files
58
+ writechoice check parse -f file.mdx # Single file
59
+ writechoice check parse -d docs # Specific directory
69
60
  ```
70
61
 
71
- You can also omit the `https://` prefix:
72
-
73
- ```bash
74
- writechoice check links docs.example.com
75
- ```
62
+ **Output:** Both `mdx_errors_report.json` and `mdx_errors_report.md`
76
63
 
77
- **Using a Validation Base URL**
64
+ ### `check links`
78
65
 
79
- When validating anchor links online, the tool can use a different base URL (e.g., a local development server or staging environment) to click on headings and extract the generated anchors:
66
+ Validates internal links and anchors using browser automation.
80
67
 
81
68
  ```bash
82
- # Use localhost:3000 for validation (default)
83
- writechoice check links docs.example.com
84
-
85
- # Use a custom validation URL
86
- writechoice check links docs.example.com http://localhost:3000
87
-
88
- # Use a staging environment
89
- writechoice check links docs.example.com https://staging.example.com
69
+ writechoice check links <baseUrl> [validationBaseUrl]
90
70
  ```
91
71
 
92
- The validation base URL is only used for online checks. Local file validation remains unchanged for optimal performance.
93
-
94
- **How the two-step validation works:**
72
+ **Common options:**
73
+ - `-f, --file <path>` - Validate single file
74
+ - `-d, --dir <path>` - Validate specific directory
75
+ - `-o, --output <path>` - Base name for reports (default: `links_report`)
76
+ - `-c, --concurrency <number>` - Concurrent browser tabs (default: 25)
77
+ - `--quiet` - Suppress output
78
+ - `--dry-run` - Extract links without validating
95
79
 
96
- For anchor links, the tool performs a smart validation:
80
+ **Output:** Both `links_report.json` and `links_report.md`
97
81
 
98
- 1. Navigates to your production docs (base URL) to find the actual heading the anchor points to
99
- 2. Then navigates to your local dev server (validation URL) and clicks the same heading to see what anchor it generates
100
- 3. Compares the two anchors to detect mismatches
82
+ ### `fix links`
101
83
 
102
- This is useful because:
103
-
104
- - Link text in MDX files may differ from actual heading text
105
- - Handles pages with duplicate headings correctly by matching position
106
- - Validates against your local development environment before deploying
107
-
108
- ### Common Options
84
+ Automatically fixes broken anchor links based on validation reports.
109
85
 
110
86
  ```bash
111
- # Validate links in a specific file
112
- writechoice check links docs.example.com -f path/to/file.mdx
113
-
114
- # Validate links in a specific directory
115
- writechoice check links docs.example.com -d path/to/docs
116
-
117
- # Dry run (extract links without validating)
118
- writechoice check links docs.example.com --dry-run
119
-
120
- # Quiet mode (suppress terminal output, only generate report)
121
- writechoice check links docs.example.com --quiet
122
-
123
- # Custom output path for report
124
- writechoice check links docs.example.com -o validation-report.json
125
-
126
- # Set concurrency level
127
- writechoice check links docs.example.com -c 50
128
-
129
- # Show browser window (for debugging)
130
- writechoice check links docs.example.com --no-headless
131
-
132
- # Auto-fix incorrect anchor links
133
- writechoice check links docs.example.com --fix
134
-
135
- # Fix links from the default report file (links_report.json)
136
- writechoice check links docs.example.com --fix-from-report
137
-
138
- # Fix links from a custom report file
139
- writechoice check links docs.example.com --fix-from-report custom_report.json
87
+ writechoice fix links # Use default report
88
+ writechoice fix links -r custom_report.json # Use custom report
140
89
  ```
141
90
 
142
- ### Complete Options
91
+ **Common options:**
92
+ - `-r, --report <path>` - Path to JSON report (default: `links_report.json`)
93
+ - `--quiet` - Suppress output
143
94
 
144
- | Option | Alias | Description | Default |
145
- | -------------------------- | ----- | ------------------------------------------------------------------------- | ----------------------- |
146
- | `<baseUrl>` | - | Base URL for the documentation site (required, with or without https://) | - |
147
- | `[validationBaseUrl]` | - | Base URL for online validation (optional, clicks headings to get anchors) | `http://localhost:3000` |
148
- | `--file <path>` | `-f` | Validate links in a single MDX file | - |
149
- | `--dir <path>` | `-d` | Validate links in a specific directory | - |
150
- | `--output <path>` | `-o` | Output path for JSON report | `links_report.json` |
151
- | `--dry-run` | - | Extract and show links without validating | `false` |
152
- | `--quiet` | - | Suppress terminal output (only generate report) | `false` |
153
- | `--concurrency <number>` | `-c` | Number of concurrent browser tabs | `25` |
154
- | `--headless` | - | Run browser in headless mode | `true` |
155
- | `--no-headless` | - | Show browser window (for debugging) | - |
156
- | `--fix` | - | Automatically fix anchor links in MDX files | `false` |
157
- | `--fix-from-report [path]` | - | Fix anchor links from report file (optional path) | `links_report.json` |
95
+ **Note:** Requires JSON report from `check links` command.
158
96
 
159
- **Note:** Detailed progress output is shown by default. Use `--quiet` to suppress terminal output.
97
+ ### `update`
160
98
 
161
- ## How It Works
99
+ Update CLI to latest version.
162
100
 
163
- ### Link Extraction
101
+ ```bash
102
+ writechoice update
103
+ ```
164
104
 
165
- The tool extracts internal links from MDX files in the following formats:
105
+ ## Features
166
106
 
167
- 1. **Markdown links**: `[Link Text](./path/to/page#anchor)`
168
- 2. **HTML anchors**: `<a href="/path/to/page#anchor">Link Text</a>`
169
- 3. **JSX Card components**: `<Card href="/path/to/page" title="Card Title" />`
170
- 4. **JSX Button components**: `<Button href="/path/to/page#anchor">Button Text</Button>`
107
+ - **MDX Parsing Validation** - Catch syntax errors before deployment
108
+ - **Link Validation** - Test links against live websites with Playwright
109
+ - **Two-Step Anchor Validation** - Compare production vs development anchors
110
+ - **Auto-Fix** - Separate fix command to automatically correct broken anchor links
111
+ - **Dual Report Formats** - Generates both JSON (for automation) and Markdown (for humans)
112
+ - **Configuration File** - Optional config.json for default settings
113
+ - **CI/CD Ready** - Exit codes for pipeline integration
171
114
 
172
- **Images are automatically ignored:**
115
+ ## How Two-Step Validation Works
173
116
 
174
- - Markdown images: `![Alt Text](./image.png)`
175
- - HTML images: `<img src="./image.png" />`
117
+ For anchor links, the tool:
176
118
 
177
- ### Validation Process
119
+ 1. **Finds the target** (Production): Navigates to production docs to identify which heading the anchor points to
120
+ 2. **Gets the anchor** (Validation): Navigates to your dev server (localhost:3000), clicks the heading, and extracts the generated anchor
121
+ 3. **Compares**: Checks if anchors match
178
122
 
179
- 1. **Local Validation**: First checks if the target MDX file exists locally
180
- - For normal links: Verifies the file exists in the repository
181
- - For anchor links: Checks if the heading exists in the MDX file with matching kebab-case format
182
- 2. **Online Validation**: If local check fails, performs a two-step validation process
183
- - For normal links: Navigates to the validation base URL and verifies the page loads successfully
184
- - For anchor links (two-step process):
185
- 1. **Step 1 - Find the target heading**: Navigates to the base URL (production docs) with the anchor to identify which heading the anchor points to and its position (handles duplicate headings)
186
- 2. **Step 2 - Get generated anchor**: Navigates to the validation base URL (e.g., localhost:3000), finds the same heading (by text and position), clicks it to trigger anchor generation, and extracts the generated anchor from the URL
187
- 3. Compares the generated anchor with the expected anchor from the MDX file
188
- 3. **Validation Base URL**: By default uses `http://localhost:3000` for online validation, or you can specify a custom URL (e.g., staging environment). This allows testing against a local development server or staging environment while validating links meant for production.
189
- 4. **Auto-Fix**: When issues are found, can automatically update MDX files with the correct anchors
123
+ This ensures your local development environment matches production behavior.
190
124
 
191
- ### Report Format
125
+ ## Configuration File
192
126
 
193
- The tool generates a JSON report with the following structure:
127
+ Create an optional `config.json` in your project root to set default values:
194
128
 
195
129
  ```json
196
130
  {
197
- "timestamp": "2024-01-15T10:30:00.000Z",
198
- "configuration": {
199
- "base_url": "https://docs.example.com",
200
- "scanned_directories": ["."],
201
- "excluded_directories": ["snippets"],
131
+ "source": "https://docs.example.com",
132
+ "target": "http://localhost:3000",
133
+ "links": {
202
134
  "concurrency": 25,
203
- "execution_time_seconds": 45.23
135
+ "quiet": false
204
136
  },
205
- "summary": {
206
- "total_links": 250,
207
- "success": 240,
208
- "failure": 8,
209
- "error": 2
210
- },
211
- "results_by_file": {
212
- "docs/getting-started.mdx": [
213
- {
214
- "source": {
215
- "filePath": "docs/getting-started.mdx",
216
- "lineNumber": 42,
217
- "linkText": "Installation Guide",
218
- "rawHref": "./installation#setup",
219
- "linkType": "markdown"
220
- },
221
- "targetUrl": "https://docs.example.com/docs/installation#setup",
222
- "status": "failure",
223
- "errorMessage": "Expected anchor \"#setup\" but page heading \"Setup Process\" should use \"#setup-process\""
224
- }
225
- ]
137
+ "parse": {
138
+ "quiet": false
226
139
  }
227
140
  }
228
141
  ```
229
142
 
230
- ## Auto-Fix Feature
231
-
232
- The `--fix` option automatically corrects anchor links that don't match the heading text:
233
-
234
- **Before:**
235
-
236
- ```markdown
237
- [Installation Guide](./installation#setup)
238
- ```
239
-
240
- **After:**
241
-
242
- ```markdown
243
- [Installation Guide](./installation#setup-process)
244
- ```
245
-
246
- ### Fix Workflow
247
-
248
- 1. **Run validation**: `writechoice check links docs.example.com`
249
- 2. **Review report**: Check the generated `links_report.json` for issues
250
- 3. **Apply fixes**: `writechoice check links docs.example.com --fix-from-report`
251
- 4. **Re-validate**: Run validation again to verify fixes
252
-
253
- Or use a custom report file:
143
+ With config.json, you can run commands without arguments:
254
144
 
255
145
  ```bash
256
- # Generate custom report
257
- writechoice check links docs.example.com -o my_report.json
146
+ # Uses source and target from config.json
147
+ writechoice check links
258
148
 
259
- # Fix from custom report
260
- writechoice check links docs.example.com --fix-from-report my_report.json
149
+ # CLI args override config.json values
150
+ writechoice check links https://staging.example.com
261
151
  ```
262
152
 
263
- ## Updates
264
-
265
- The CLI automatically checks for new versions and displays a notification when an update is available:
266
-
267
- ```
268
- ┌─────────────────────────────────────────────────┐
269
- │ Update available: 0.0.2 → 0.0.3 │
270
- │ Run: writechoice update │
271
- └─────────────────────────────────────────────────┘
272
- ```
153
+ See [config.example.json](config.example.json) for all available options.
273
154
 
274
- To update manually:
155
+ ## Examples
275
156
 
276
157
  ```bash
277
- # Using the built-in update command (recommended)
278
- writechoice update
279
-
280
- # Or using npm directly
281
- npm install -g @writechoice/mint-cli@latest
282
- ```
283
-
284
- ## Configuration
285
-
286
- ### Excluded Directories
287
-
288
- By default, the following directories are excluded from scanning:
289
-
290
- - `snippets/`
158
+ # Validate all MDX files for parsing errors
159
+ writechoice check parse
291
160
 
292
- You can modify this in the source code at [src/commands/validate/links.js](src/commands/validate/links.js).
161
+ # Validate all links (uses localhost:3000 by default)
162
+ writechoice check links https://docs.example.com
293
163
 
294
- ### Default Concurrency
164
+ # Validate with staging environment
165
+ writechoice check links docs.example.com https://staging.example.com
295
166
 
296
- The default concurrency is set to 25 concurrent browser tabs. Adjust this based on your system resources:
167
+ # Validate specific directory only
168
+ writechoice check links docs.example.com -d api
297
169
 
298
- - **Lower values** (5-10): Slower but less resource-intensive
299
- - **Higher values** (50-100): Faster but requires more memory and CPU
170
+ # Run quietly (only generate reports)
171
+ writechoice check links docs.example.com --quiet
300
172
 
301
- ## Examples
173
+ # Fix broken anchor links
174
+ writechoice fix links
302
175
 
303
- ### Validate all links (with progress output)
176
+ # Fix from custom report
177
+ writechoice fix links -r custom_report.json
304
178
 
305
- ```bash
179
+ # Full workflow: validate -> fix -> re-validate
180
+ writechoice check links docs.example.com
181
+ writechoice fix links
306
182
  writechoice check links docs.example.com
307
183
  ```
308
184
 
309
- ### Validate quietly (suppress terminal output)
185
+ ## Documentation
310
186
 
311
- ```bash
312
- writechoice check links docs.example.com --quiet
313
- ```
187
+ Detailed documentation is available in the [docs/](docs/) folder:
314
188
 
315
- ### Validate and fix issues in one command
189
+ - **Commands**
190
+ - [config](docs/commands/config.md) - Generate config.json template
191
+ - [check links](docs/commands/check-links.md) - Link validation
192
+ - [check parse](docs/commands/check-parse.md) - MDX parsing validation
193
+ - [fix links](docs/commands/fix-links.md) - Auto-fix broken links
194
+ - [update](docs/commands/update.md) - Update command
195
+ - **Guides**
196
+ - [Configuration File](docs/config-file.md) - Using config.json
197
+ - [Configuration](docs/configuration.md) - Advanced configuration
198
+ - [Publishing](docs/publishing.md) - How to publish new versions
316
199
 
317
- ```bash
318
- writechoice check links docs.example.com --fix
319
- ```
200
+ ## Development
320
201
 
321
- ### Two-step fix workflow
202
+ ### Local Setup
322
203
 
323
204
  ```bash
324
- # Step 1: Generate report
325
- writechoice check links docs.example.com -o issues.json
326
-
327
- # Step 2: Review and apply fixes
328
- writechoice check links docs.example.com --fix-from-report issues.json
329
-
330
- # Or fix from default report (links_report.json)
331
- writechoice check links docs.example.com --fix-from-report
205
+ git clone <repository-url>
206
+ cd writechoice-mint-cli
207
+ npm install
208
+ npx playwright install chromium
209
+ chmod +x bin/cli.js
210
+ npm link
332
211
  ```
333
212
 
334
- ### Validate specific directory
213
+ ### Project Structure
335
214
 
336
- ```bash
337
- writechoice check links docs.example.com -d docs/api
215
+ ```
216
+ writechoice-mint-cli/
217
+ ├── bin/
218
+ │ └── cli.js # CLI entry point
219
+ ├── src/
220
+ │ ├── commands/
221
+ │ │ ├── validate/
222
+ │ │ │ ├── links.js # Link validation
223
+ │ │ │ └── mdx.js # MDX parsing validation
224
+ │ │ └── fix/
225
+ │ │ └── links.js # Link fixing
226
+ │ └── utils/
227
+ │ ├── helpers.js # Utility functions
228
+ │ └── reports.js # Report generation
229
+ ├── docs/ # Detailed documentation
230
+ ├── package.json
231
+ └── README.md
338
232
  ```
339
233
 
340
234
  ## Troubleshooting
341
235
 
342
236
  ### Playwright Not Installed
343
237
 
344
- If you get an error about Playwright not being installed:
345
-
346
238
  ```bash
347
239
  npx playwright install chromium
348
240
  ```
349
241
 
350
242
  ### Memory Issues
351
243
 
352
- If you encounter memory issues with high concurrency:
353
-
354
244
  ```bash
355
245
  writechoice check links docs.example.com -c 10
356
246
  ```
357
247
 
358
- ### Browser Launch Failed
359
-
360
- If the browser fails to launch in headless mode:
248
+ ### Permission Errors
361
249
 
362
250
  ```bash
363
- writechoice check links docs.example.com --no-headless
251
+ sudo npm install -g @writechoice/mint-cli
364
252
  ```
365
253
 
366
- ## Development
367
-
368
- ### Project Structure
369
-
370
- ```
371
- writechoice-mint-cli/
372
- ├── bin/
373
- │ └── cli.js # CLI entry point
374
- ├── src/
375
- │ ├── commands/
376
- │ │ └── validate/
377
- │ │ └── links.js # Link validation logic
378
- │ └── utils/
379
- │ └── helpers.js # Helper functions
380
- ├── package.json
381
- └── README.md
382
- ```
383
-
384
- ### Running Tests
385
-
386
- ```bash
387
- npm test
388
- ```
389
-
390
- ### Adding New Commands
391
-
392
- 1. Create a new command file in `src/commands/`
393
- 2. Add the command to `bin/cli.js`
394
- 3. Update this README with usage instructions
254
+ Or use a node version manager like [nvm](https://github.com/nvm-sh/nvm).
395
255
 
396
256
  ## License
397
257
 
@@ -400,3 +260,9 @@ MIT
400
260
  ## Contributing
401
261
 
402
262
  Contributions are welcome! Please open an issue or submit a pull request.
263
+
264
+ ## Links
265
+
266
+ - [npm package](https://www.npmjs.com/package/@writechoice/mint-cli)
267
+ - [GitHub repository](https://github.com/writechoice/mint-cli)
268
+ - [Issue tracker](https://github.com/writechoice/mint-cli/issues)
package/bin/cli.js CHANGED
@@ -24,25 +24,86 @@ const check = program.command("check").description("Validation commands for docu
24
24
 
25
25
  // Validate links subcommand
26
26
  check
27
- .command("links <baseUrl> [validationBaseUrl]")
27
+ .command("links [baseUrl] [validationBaseUrl]")
28
28
  .description("Validate internal links and anchors in MDX documentation files")
29
29
  .option("-f, --file <path>", "Validate links in a single MDX file")
30
30
  .option("-d, --dir <path>", "Validate links in a specific directory")
31
- .option("-o, --output <path>", "Output path for JSON report", "links_report.json")
31
+ .option("-o, --output <path>", "Output path for report (without extension)", "links_report")
32
32
  .option("--dry-run", "Extract and show links without validating")
33
33
  .option("--quiet", "Suppress terminal output (only generate report)")
34
34
  .option("-c, --concurrency <number>", "Number of concurrent browser tabs", "25")
35
35
  .option("--headless", "Run browser in headless mode (default)", true)
36
36
  .option("--no-headless", "Show browser window (for debugging)")
37
- .option("--fix", "Automatically fix anchor links in MDX files")
38
- .option("--fix-from-report [path]", "Fix anchor links from report file (default: links_report.json)")
39
37
  .action(async (baseUrl, validationBaseUrl, options) => {
38
+ const { loadConfig, mergeLinksConfig, validateRequiredConfig } = await import("../src/utils/config.js");
40
39
  const { validateLinks } = await import("../src/commands/validate/links.js");
41
- // Verbose is now default (true unless --quiet is specified)
40
+
41
+ // Load config.json if it exists
42
+ const config = loadConfig();
43
+
44
+ // Merge CLI args with config file (CLI takes precedence)
45
+ const merged = mergeLinksConfig(baseUrl, validationBaseUrl, options, config);
46
+
47
+ // Validate that baseUrl is provided (either via CLI or config)
48
+ try {
49
+ validateRequiredConfig(merged.baseUrl, "writechoice check links");
50
+ } catch (error) {
51
+ console.error(error.message);
52
+ process.exit(1);
53
+ }
54
+
55
+ // Set defaults
56
+ merged.options.verbose = !merged.options.quiet;
57
+ merged.options.validationBaseUrl = merged.validationBaseUrl || "http://localhost:3000";
58
+
59
+ await validateLinks(merged.baseUrl, merged.options);
60
+ });
61
+
62
+ // Validate MDX parsing subcommand
63
+ check
64
+ .command("parse")
65
+ .description("Validate MDX files for parsing errors")
66
+ .option("-f, --file <path>", "Validate a single MDX file")
67
+ .option("-d, --dir <path>", "Validate MDX files in a specific directory")
68
+ .option("--quiet", "Suppress terminal output (only generate report)")
69
+ .action(async (options) => {
70
+ const { loadConfig, mergeParseConfig } = await import("../src/utils/config.js");
71
+ const { validateMdxFiles } = await import("../src/commands/validate/mdx.js");
72
+
73
+ // Load config.json if it exists
74
+ const config = loadConfig();
75
+
76
+ // Merge CLI args with config file (CLI takes precedence)
77
+ const mergedOptions = mergeParseConfig(options, config);
78
+
79
+ mergedOptions.verbose = !mergedOptions.quiet;
80
+ await validateMdxFiles(mergedOptions);
81
+ });
82
+
83
+ // Fix command
84
+ const fix = program.command("fix").description("Fix issues found in validation reports");
85
+
86
+ // Fix links subcommand
87
+ fix
88
+ .command("links")
89
+ .description("Fix broken anchor links from validation report")
90
+ .option("-r, --report <path>", "Path to validation report", "links_report.json")
91
+ .option("--quiet", "Suppress terminal output")
92
+ .action(async (options) => {
93
+ const { fixLinks } = await import("../src/commands/fix/links.js");
42
94
  options.verbose = !options.quiet;
43
- // Set validation base URL to localhost:3000 if not provided
44
- options.validationBaseUrl = validationBaseUrl || "http://localhost:3000";
45
- await validateLinks(baseUrl, options);
95
+ await fixLinks(options);
96
+ });
97
+
98
+ // Config command
99
+ program
100
+ .command("config")
101
+ .description("Generate a config.json template file")
102
+ .option("--force", "Overwrite existing config.json file")
103
+ .option("--quiet", "Suppress terminal output")
104
+ .action(async (options) => {
105
+ const { generateConfig } = await import("../src/commands/config.js");
106
+ await generateConfig(options);
46
107
  });
47
108
 
48
109
  // Update command
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@writechoice/mint-cli",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "CLI tool for Mintlify documentation validation and utilities",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -41,11 +41,12 @@
41
41
  "PUBLISH.md"
42
42
  ],
43
43
  "dependencies": {
44
+ "@mdx-js/mdx": "^3.1.1",
45
+ "chalk": "^5.3.0",
44
46
  "commander": "^12.0.0",
45
- "playwright": "^1.40.0",
46
- "chalk": "^5.3.0"
47
+ "playwright": "^1.40.0"
47
48
  },
48
49
  "engines": {
49
50
  "node": ">=18.0.0"
50
51
  }
51
- }
52
+ }