@@ -41,40 +41,52 @@ Creates and configures authentication tokens for InfluxDB 3 containers.
41
41
./setup-auth-tokens.sh enterprise
42
42
```
43
43
44
- ### 🔍 CLI Documentation Audit
44
+ ### 📘 CLI Documentation Audit
45
45
46
- #### ` audit-cli- documentation.js`
47
- JavaScript ESM script that audits InfluxDB 3 CLI commands against existing documentation to identify missing or outdated content .
46
+ #### ` documentation-audit .js `
47
+ JavaScript ESM script that parses InfluxDB 3 source code to extract CLI commands and audits them against existing documentation with enhanced accuracy and category filtering .
48
48
49
49
** Usage:**
50
50
``` bash
51
- node audit-cli- documentation.js [core| enterprise| both] [version| local ]
51
+ node documentation-audit .js [core| enterprise| both] [version/branch/tag] [--categories = CATEGORY1,CATEGORY2,... ]
52
52
```
53
53
54
54
** Features:**
55
- - Compares actual CLI help output with documented commands
56
- - Identifies missing documentation for new CLI options
57
- - Finds documented options that no longer exist in the CLI
58
- - Supports both released versions and local containers
59
- - Generates detailed audit reports with recommendations
60
- - Handles authentication automatically using Docker secrets
55
+ - ** Source code parsing** : Parses Rust CLI implementation directly from source code
56
+ - ** Accurate pattern matching** : Uses regex with word boundaries to reduce false positives
57
+ - ** Category-based filtering** : Focus audits on specific documentation areas
58
+ - ** Enterprise feature detection** : Identifies enterprise-specific commands and features
59
+ - ** Complete option extraction** : Extracts descriptions, defaults, environment variables, and requirements
60
+ - ** Template generation** : Creates documentation templates for missing commands
61
+
62
+ ** Available Categories:**
63
+ - ` CLI_REFERENCE ` - CLI reference documentation
64
+ - ` API_REFERENCE ` - API documentation
65
+ - ` GETTING_STARTED ` - Getting started and tutorials
66
+ - ` ADMIN_GUIDES ` - Administration and management
67
+ - ` WRITE_DATA ` - Write and ingest data documentation
68
+ - ` QUERY_DATA ` - Query and read data documentation
69
+ - ` PROCESS_DATA ` - Process and transform data documentation
70
+ - ` GENERAL_REFERENCE ` - General reference documentation
61
71
62
72
** Examples:**
63
73
``` bash
64
- # Audit Core documentation against local container
65
- node audit-cli- documentation.js core local
74
+ # Audit Core documentation with all categories
75
+ node documentation-audit .js core main
66
76
67
- # Audit Enterprise documentation against specific version
68
- node audit-cli- documentation.js enterprise v3.2.0
77
+ # Audit Enterprise with only CLI and API reference categories
78
+ node documentation-audit .js enterprise main --categories=CLI_REFERENCE,API_REFERENCE
69
79
70
- # Audit both products against local containers
71
- node audit-cli-documentation.js both local
80
+ # Audit specific version with getting started docs only
81
+ node documentation-audit.js both v3.3.0 --categories=GETTING_STARTED
82
+
83
+ # Audit with multiple specific categories
84
+ node documentation-audit.js core main --categories=CLI_REFERENCE,ADMIN_GUIDES,WRITE_DATA
72
85
```
73
86
74
87
** Output:**
75
- - ` ../output/cli-audit/documentation-audit-{product}-{version}.md ` - Detailed audit report
76
- - ` ../output/cli-audit/parsed-cli-{product}-{version}.md ` - Parsed CLI structure
77
- - ` ../output/cli-audit/patches/{product}/ ` - Generated patches for missing documentation
88
+ - ` ../output/cli-audit/documentation-audit-{product}-{version}.md ` - Enhanced audit report with source code insights
89
+ - ` ../output/cli-audit/patches/{product}/ ` - Generated documentation templates with complete option details
78
90
79
91
### 🛠️ CLI Documentation Updates
80
92
@@ -131,12 +143,12 @@ docker compose down && docker compose up -d influxdb3-core influxdb3-enterprise
131
143
### 2. CLI Documentation Audit
132
144
133
145
``` bash
134
- # Start your containers
135
- docker compose up -d influxdb3-core influxdb3-enterprise
146
+ # Audit CLI documentation from source code
147
+ node documentation-audit.js core main
148
+ node documentation-audit.js enterprise main
136
149
137
- # Audit CLI documentation
138
- node audit-cli-documentation.js core local
139
- node audit-cli-documentation.js enterprise local
150
+ # Or audit with specific categories
151
+ node documentation-audit.js both main --categories=CLI_REFERENCE
140
152
141
153
# Review the output
142
154
ls ../output/cli-audit/
@@ -145,12 +157,12 @@ ls ../output/cli-audit/
145
157
### 3. Development Workflow
146
158
147
159
``` bash
148
- # Audit documentation for both products
149
- node audit-cli- documentation.js both local
160
+ # Audit using source code parsing with category filtering
161
+ node documentation-audit .js both main --categories=CLI_REFERENCE,API_REFERENCE
150
162
151
163
# Check the audit results
152
- cat ../output/cli-audit/documentation-audit-core-local .md
153
- cat ../output/cli-audit/documentation-audit-enterprise-local .md
164
+ cat ../output/cli-audit/documentation-audit-core-main .md
165
+ cat ../output/cli-audit/documentation-audit-enterprise-main .md
154
166
155
167
# Apply patches if needed (dry run first)
156
168
node apply-cli-patches.js both --dry-run
@@ -162,7 +174,7 @@ For release documentation, use the audit and patch workflow:
162
174
163
175
``` bash
164
176
# Audit against released version
165
- node audit-cli- documentation.js enterprise v3.2.0
177
+ node documentation-audit .js enterprise v3.2.0
166
178
167
179
# Review missing documentation
168
180
cat ../output/cli-audit/documentation-audit-enterprise-v3.2.0.md
@@ -176,12 +188,18 @@ git diff content/influxdb3/enterprise/reference/cli/
176
188
177
189
## Container Integration
178
190
179
- The scripts work with your Docker Compose setup:
191
+ The scripts work with your Docker Compose setup and automatically manage container lifecycle :
180
192
181
193
** Expected container names:**
182
194
- ` influxdb3-core ` (port 8282)
183
195
- ` influxdb3-enterprise ` (port 8181)
184
196
197
+ ** Container management:**
198
+ - Scripts automatically start containers if they're not running
199
+ - Uses ` docker compose up -d {service} ` to start services
200
+ - Waits for containers to be ready before proceeding
201
+ - Uses ` docker compose exec -T ` for non-interactive command execution
202
+
185
203
** Docker Compose secrets:**
186
204
- ` influxdb3-core-admin-token ` - Admin token for Core (stored in ` ~/.env.influxdb3-core-admin-token ` )
187
205
- ` influxdb3-enterprise-admin-token ` - Admin token for Enterprise (stored in ` ~/.env.influxdb3-enterprise-admin-token ` )
@@ -193,7 +211,7 @@ The scripts work with your Docker Compose setup:
193
211
194
212
1 . ** Pre-release audit:**
195
213
``` bash
196
- node audit-cli- documentation.js core v3.2.0
214
+ node documentation-audit .js core v3.2.0
197
215
```
198
216
199
217
2 . ** Review audit results and update documentation**
@@ -202,9 +220,9 @@ The scripts work with your Docker Compose setup:
202
220
203
221
### 🔬 Development Testing
204
222
205
- 1 . ** Audit local development:**
223
+ 1 . ** Audit development branch :**
206
224
``` bash
207
- node audit-cli- documentation.js enterprise local
225
+ node documentation-audit .js enterprise main
208
226
```
209
227
210
228
2 . ** Verify new features are documented**
@@ -215,7 +233,7 @@ The scripts work with your Docker Compose setup:
215
233
216
234
1 . ** Final audit before release:**
217
235
``` bash
218
- node audit-cli- documentation.js both local
236
+ node documentation-audit .js both v3.3.0
219
237
```
220
238
221
239
2 . ** Apply all pending patches**
@@ -228,21 +246,20 @@ The scripts work with your Docker Compose setup:
228
246
helper-scripts/
229
247
├── output/
230
248
│ └── cli-audit/
231
- │ ├── documentation-audit-core-local.md # CLI documentation audit report
232
- │ ├── documentation-audit-enterprise-v3.2.0.md # CLI documentation audit report
233
- │ ├── parsed-cli-core-local.md # Parsed CLI structure
234
- │ ├── parsed-cli-enterprise-v3.2.0.md # Parsed CLI structure
249
+ │ ├── documentation-audit-core-main.md # CLI documentation audit report
250
+ │ ├── documentation-audit-enterprise-v3.2.0.md # CLI documentation audit report
251
+ │ ├── influxdb-clone/ # Working copy of source code
235
252
│ └── patches/
236
253
│ ├── core/ # Generated patches for Core
237
- │ │ ├── influxdb3-cli-patch-001 .md
238
- │ │ └── influxdb3-cli-patch-002 .md
254
+ │ │ ├── query .md
255
+ │ │ └── write .md
239
256
│ └── enterprise/ # Generated patches for Enterprise
240
- │ ├── influxdb3-cli-patch-001 .md
241
- │ └── influxdb3-cli-patch-002 .md
257
+ │ ├── backup .md
258
+ │ └── restore .md
242
259
└── influxdb3-monolith/
243
260
├── README.md # This file
244
261
├── setup-auth-tokens.sh # Auth setup
245
- ├── audit-cli- documentation.js # CLI documentation audit
262
+ ├── documentation-audit .js # CLI documentation audit (source code-based)
246
263
└── apply-cli-patches.js # CLI documentation patches
247
264
```
248
265
@@ -252,11 +269,20 @@ helper-scripts/
252
269
253
270
** Container not running:**
254
271
``` bash
255
- # Check status
272
+ # Scripts now handle this automatically, but you can manually check:
256
273
docker compose ps
257
274
258
- # Start specific service
259
- docker compose up -d influxdb3-core
275
+ # Or manually start
276
+ docker compose up -d influxdb3-core influxdb3-enterprise
277
+ ```
278
+
279
+ ** Source code access issues:**
280
+ ``` bash
281
+ # Check if the source repository exists
282
+ ls /Users/ja/Documents/github/influxdata/influxdb
283
+
284
+ # Verify git access
285
+ cd /Users/ja/Documents/github/influxdata/influxdb && git status
260
286
```
261
287
262
288
** Authentication failures:**
@@ -290,7 +316,7 @@ DEBUG=1 node audit-cli-documentation.js core local
290
316
- name : Audit CLI Documentation
291
317
run : |
292
318
cd helper-scripts/influxdb3-monolith
293
- node audit-cli- documentation.js core ${{ env.VERSION }}
319
+ node documentation-audit .js core ${{ env.VERSION }}
294
320
295
321
- name : Upload CLI Audit Results
296
322
uses : actions/upload-artifact@v3
@@ -306,7 +332,7 @@ DEBUG=1 node audit-cli-documentation.js core local
306
332
name : CLI Documentation Audit
307
333
command : |
308
334
cd helper-scripts/influxdb3-monolith
309
- node audit-cli- documentation.js enterprise v3.2.0
335
+ node documentation-audit .js enterprise v3.2.0 --categories=CLI_REFERENCE
310
336
311
337
- store_artifacts :
312
338
path : helper-scripts/output/cli-audit/
0 commit comments