vnxt 1.7.7 → 1.8.0

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 (3) hide show
  1. package/README.md +451 -451
  2. package/package.json +46 -46
  3. package/vnxt.js +16 -2
package/README.md CHANGED
@@ -1,452 +1,452 @@
1
- <p>
2
- <img src="./docs/logos/vnxt_light_logo.png" alt="vnxt logo" width="200">
3
- </p>
4
-
5
- # vnxt (vx)
6
-
7
- A lightweight CLI tool for automated version bumping with changelog generation and git integration.
8
-
9
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Features
10
-
11
- - 🚀 Automatic semantic version detection from commit messages
12
- - 📝 Automatic CHANGELOG.md generation
13
- - 🏷️ Git tag annotation
14
- - 🔍 Pre-flight checks for clean working directory
15
- - 🔬 Dry-run mode to preview changes
16
- - 📋 Release notes generation
17
- - ⚙️ Project-level configuration support
18
- - 💬 Interactive mode when no arguments provided
19
- - 🎨 Colored terminal output for better readability
20
- - 🤫 Quiet mode for CI/CD environments
21
-
22
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Installation
23
-
24
- ### Global Installation
25
-
26
- **Bash/PowerShell:**
27
- ```bash
28
- npm install -g vnxt
29
- ```
30
-
31
- After installation, you can use either `vnxt` or the shorter alias `vx`:
32
- ```bash
33
- vnxt --help
34
- vx --help # Same thing, shorter!
35
- ```
36
-
37
- ### Local Installation (from source)
38
-
39
- **Bash/macOS/Linux:**
40
- ```bash
41
- # Clone the repository
42
- git clone https://github.com/n-orrow/vnxt.git
43
- cd vnxt
44
-
45
- # Install globally via npm link
46
- chmod +x vnxt.js
47
- npm link
48
- ```
49
-
50
- **PowerShell/Windows:**
51
- ```powershell
52
- # Clone the repository
53
- git clone https://github.com/n-orrow/vnxt.git
54
- cd vnxt
55
-
56
- # Install globally via npm link
57
- npm link
58
- ```
59
-
60
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Usage
61
-
62
- ### Basic Examples
63
-
64
- **Bash/PowerShell:**
65
- ```bash
66
- # Simple version bump (auto-detects patch from "fix:")
67
- vnxt -m "fix: resolve RFID reader bug"
68
- # or use the shorter alias:
69
- vx -m "fix: resolve RFID reader bug"
70
-
71
- # Feature addition (auto-detects minor from "feat:")
72
- vx -m "feat: add heatmap visualization"
73
-
74
- # Breaking change (auto-detects major from "BREAKING")
75
- vx -m "BREAKING: redesign API structure"
76
-
77
- # With changelog and push to remote
78
- vx -m "feat: add new dashboard" -c -p
79
-
80
- # Interactive mode (prompts for input)
81
- vx
82
- ```
83
-
84
- ### Command Line Options
85
-
86
- All options work with both `vnxt` and `vx`:
87
-
88
- ```
89
- -m, --message <msg> Commit message (required unless using interactive mode)
90
- -t, --type <type> Version type: patch, minor, major (auto-detected from message)
91
- -v, --version <ver> Set specific version (e.g., 2.0.0-beta.1)
92
- -V, --version Show vnxt version
93
- -p, --push Push to remote with tags
94
- -dnp, --no-push Prevent auto-push (overrides config)
95
- -c, --changelog Update CHANGELOG.md
96
- -d, --dry-run Show what would happen without making changes
97
- -a, --all [mode] Stage files before versioning (prompts if no mode)
98
- Modes: tracked, all, interactive (i), patch (p)
99
- -r, --release Generate release notes file
100
- -q, --quiet Minimal output (errors only)
101
- -h, --help Show help message
102
- ```
103
-
104
- ### Automatic Version Detection
105
-
106
- vnxt automatically detects the version bump type from your commit message:
107
-
108
- - `major:` → **major** version bump
109
- - `minor:` → **minor** version bump
110
- - `patch:` → **patch** version bump
111
- - `feat:` or `feature:` → **minor** version bump
112
- - `fix:` → **patch** version bump
113
- - `BREAKING:` or contains `BREAKING` → **major** version bump
114
-
115
- You can override this with the `-t` flag.
116
-
117
- ### Dry Run
118
-
119
- Preview what will happen without making changes:
120
-
121
- **Bash/PowerShell:**
122
- ```bash
123
- vx -m "feat: new feature" -d
124
- ```
125
-
126
- Output:
127
- ```
128
- 🔬 DRY RUN MODE - No changes will be made
129
-
130
- Would perform the following actions:
131
- 1. Bump minor version
132
- 2. Commit with message: "feat: new feature"
133
- 3. Create git tag with annotation
134
- 4. (Skipping push - use --push to enable)
135
-
136
- ✓ Dry run complete. Use without -d to apply changes.
137
- ```
138
-
139
- ### Custom Versions
140
-
141
- Set a specific version number (useful for pre-releases):
142
-
143
- **Bash/PowerShell:**
144
- ```bash
145
- vx -v 2.0.0-beta.1 -m "beta: initial release candidate"
146
- vx -v 1.5.0-rc.2 -m "release candidate 2"
147
- ```
148
-
149
- ### Changelog Generation
150
-
151
- Automatically update CHANGELOG.md with version history:
152
-
153
- **Bash/PowerShell:**
154
- ```bash
155
- vx -m "feat: add user authentication" -c
156
- ```
157
-
158
- Creates/updates CHANGELOG.md:
159
- ```markdown
160
- # Changelog
161
-
162
- ## [1.2.0] - 2024-02-10
163
- - feat: add user authentication
164
-
165
- ## [1.1.0] - 2024-02-09
166
- - feat: add dashboard
167
- ```
168
-
169
- ### Release Notes
170
-
171
- Generate a formatted release notes file:
172
-
173
- **Bash/PowerShell:**
174
- ```bash
175
- vx -m "feat: major feature release" -r
176
- ```
177
-
178
- Creates `release-notes-v1.2.0.md`:
179
- ```markdown
180
- # Release v1.2.0
181
-
182
- Released: 2024-02-10
183
-
184
- ## Changes
185
- feat: major feature release
186
-
187
- ## Installation
188
- npm install your-package@1.2.0
189
- ```
190
-
191
- ### File Staging Options
192
-
193
- vnxt offers flexible file staging with the `-a` flag:
194
-
195
- **Bash/PowerShell:**
196
- ```bash
197
- # Interactive prompt (asks which mode to use)
198
- vx -m "chore: update" -a
199
-
200
- # Specific modes
201
- vx -m "fix: bug" -a tracked # Stage tracked files only (git add -u)
202
- vx -m "feat: new" -a all # Stage all changes (git add -A)
203
- vx -m "refactor: code" -a i # Interactive selection (git add -i)
204
- vx -m "fix: typo" -a p # Patch mode (git add -p)
205
- ```
206
-
207
- **Staging Modes:**
208
- - `tracked` - Only staged tracked files that have been modified/deleted (default)
209
- - `all` - Stages all changes, respects `.gitignore` for new files
210
- - `interactive` or `i` - Opens git's interactive staging mode
211
- - `patch` or `p` - Opens patch mode for selective staging
212
-
213
- **Note:** If you run `vx` without any files staged and without the `-a` flag, vnxt will prompt you interactively to choose a staging mode.
214
-
215
- ### Quiet Mode
216
-
217
- Minimize terminal output for CI/CD environments:
218
-
219
- **Bash/PowerShell:**
220
- ```bash
221
- vx -m "feat: new feature" -q
222
- ```
223
-
224
- In quiet mode:
225
- - ✅ Errors still display
226
- - ❌ Progress messages hidden
227
- - ❌ Summary stats hidden
228
- - ❌ Git diff output hidden
229
-
230
- Perfect for automated workflows where you only want to see failures.
231
-
232
- ### Check Version
233
-
234
- Display the installed vnxt version:
235
-
236
- **Bash/PowerShell:**
237
- ```bash
238
- vx -V
239
- # or
240
- vnxt --version
241
- ```
242
-
243
- Output:
244
- ```
245
- vnxt v1.7.0
246
- ```
247
-
248
- ### Complete Workflow Example
249
-
250
- **Bash/PowerShell:**
251
- ```bash
252
- # Make changes to your code
253
- # ...
254
-
255
- # Dry run to preview
256
- vx -m "feat: add new API endpoint" -d
257
-
258
- # Execute with changelog, release notes, and push
259
- vx -m "feat: add new API endpoint" -c -r -p
260
- ```
261
-
262
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Configuration
263
-
264
- Create a `.vnxtrc.json` file in your project root to set defaults:
265
- ```json
266
- {
267
- "autoChangelog": true,
268
- "defaultType": "patch",
269
- "requireCleanWorkingDir": false,
270
- "autoPush": true,
271
- "defaultStageMode": "tracked",
272
- "tagPrefix": "v",
273
- "colors": true
274
- }
275
- ```
276
-
277
- ### Configuration Options
278
-
279
- | Option | Type | Default | Description |
280
- |--------|------|---------|-------------|
281
- | `autoChangelog` | boolean | `true` | Automatically update CHANGELOG.md on every bump |
282
- | `defaultType` | string | `"patch"` | Default version bump type if not auto-detected |
283
- | `requireCleanWorkingDir` | boolean | `false` | Require clean git working directory before bumping |
284
- | `autoPush` | boolean | `true` | Automatically push to remote after bumping |
285
- | `defaultStageMode` | string | `"tracked"` | Default staging mode when using `-a` flag |
286
- | `tagPrefix` | string | `"v"` | Prefix for git tags (e.g., "v1.2.3") |
287
- | `colors` | boolean | `true` | Enable colored terminal output |
288
-
289
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Pre-flight Checks
290
-
291
- vnxt performs several checks before making changes:
292
-
293
- - ✅ Verifies no uncommitted changes (unless using `-a`)
294
- - ✅ Warns if not on main/master branch
295
- - ✅ Checks for remote repository (if pushing)
296
-
297
- Example output:
298
- ```
299
- 🔍 Running pre-flight checks...
300
-
301
- ⚠️ Warning: You're on branch 'feature/new-dashboard', not main/master
302
- ✅ Pre-flight checks passed
303
- ```
304
-
305
- ## Interactive Mode
306
-
307
- Run `vnxt` (or `vx`) without arguments for guided prompts:
308
-
309
- **Bash/PowerShell:**
310
- ```bash
311
- vx
312
- ```
313
-
314
- Output:
315
- ```
316
- 🤔 Interactive mode
317
-
318
- Commit message: feat: add new feature
319
- Version type (patch/minor/major) [patch]: minor
320
-
321
- 📝 Auto-detected: minor version bump (feature)
322
-
323
- 🔍 Running pre-flight checks...
324
- ...
325
- ```
326
-
327
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Workflow Examples
328
-
329
- ### Quick Fix
330
-
331
- **Bash/PowerShell:**
332
- ```bash
333
- vx -m "fix: resolve login bug"
334
- ```
335
-
336
- ### Feature Release
337
-
338
- **Bash/PowerShell:**
339
- ```bash
340
- vx -m "feat: add dashboard analytics" -c -p
341
- ```
342
-
343
- ### Major Release with Full Documentation
344
-
345
- **Bash/PowerShell:**
346
- ```bash
347
- vx -m "BREAKING: new API structure" -c -r -p
348
- ```
349
-
350
- ### Local Development (No Push)
351
-
352
- **Bash/PowerShell:**
353
- ```bash
354
- vx -m "chore: refactor code" -a
355
- ```
356
-
357
- ### CI/CD Pipeline
358
-
359
- **Bash/PowerShell:**
360
- ```bash
361
- # Quiet mode - only shows errors
362
- vx -m "chore: automated update" -q
363
- ```
364
-
365
- ### Check Installed Version
366
-
367
- **Bash/PowerShell:**
368
- ```bash
369
- vx -V
370
- ```
371
-
372
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Troubleshooting
373
-
374
- ### Not a Git Repository
375
-
376
- If you see this error:
377
- ```
378
- ❌ Not a git repository. Run `git init` first.
379
- ```
380
-
381
- You're trying to use vnxt in a directory that isn't a git repository. Initialize git first:
382
-
383
- **Bash/PowerShell:**
384
- ```bash
385
- git init
386
- ```
387
-
388
- ### Permission Denied (Windows PowerShell)
389
-
390
- If you get execution policy errors:
391
- ```powershell
392
- Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
393
- ```
394
-
395
- ### Uncommitted Changes Error
396
-
397
- Either commit your changes first, or use the `-a` flag to stage all changes:
398
-
399
- **Bash/PowerShell:**
400
- ```bash
401
- vx -m "your message" -a
402
- ```
403
-
404
- ### Command Not Found After Installation
405
-
406
- Make sure npm's global bin directory is in your PATH:
407
-
408
- **Bash:**
409
- ```bash
410
- npm config get prefix
411
- # Add the bin subdirectory to your PATH
412
- ```
413
-
414
- **PowerShell:**
415
- ```powershell
416
- npm config get prefix
417
- # Add the bin subdirectory to your PATH in System Environment Variables
418
- ```
419
-
420
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Requirements
421
-
422
- - Node.js 12.x or higher
423
- - npm 6.x or higher
424
- - Git installed and configured
425
-
426
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Version Management
427
-
428
- This project uses [vnxt](https://vnxt.dev) for version bumping with the following configuration:
429
-
430
- - Auto-push enabled (`autoPush: true`)
431
- - Auto-changelog enabled (`autoChangelog: true`)
432
- - Clean working directory not required (`requireCleanWorkingDir: false`)
433
-
434
- See `.vnxtrc.json` for full configuration.
435
-
436
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Author
437
-
438
- Nate Orrow - Software Developer
439
-
440
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> License
441
-
442
- MIT License - see [LICENSE](LICENSE) file for details
443
-
444
- ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Contributing
445
-
446
- Contributions are welcome! Please feel free to submit a Pull Request.
447
-
448
- 1. Fork the repository
449
- 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
450
- 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
451
- 4. Push to the branch (`git push origin feature/amazing-feature`)
1
+ <p>
2
+ <img src="./docs/logos/vnxt_light_logo.png" alt="vnxt logo" width="200">
3
+ </p>
4
+
5
+ # vnxt (vx)
6
+
7
+ A lightweight CLI tool for automated version bumping with changelog generation and git integration.
8
+
9
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Features
10
+
11
+ - 🚀 Automatic semantic version detection from commit messages
12
+ - 📝 Automatic CHANGELOG.md generation
13
+ - 🏷️ Git tag annotation
14
+ - 🔍 Pre-flight checks for clean working directory
15
+ - 🔬 Dry-run mode to preview changes
16
+ - 📋 Release notes generation
17
+ - ⚙️ Project-level configuration support
18
+ - 💬 Interactive mode when no arguments provided
19
+ - 🎨 Colored terminal output for better readability
20
+ - 🤫 Quiet mode for CI/CD environments
21
+
22
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Installation
23
+
24
+ ### Global Installation
25
+
26
+ **Bash/PowerShell:**
27
+ ```bash
28
+ npm install -g vnxt
29
+ ```
30
+
31
+ After installation, you can use either `vnxt` or the shorter alias `vx`:
32
+ ```bash
33
+ vnxt --help
34
+ vx --help # Same thing, shorter!
35
+ ```
36
+
37
+ ### Local Installation (from source)
38
+
39
+ **Bash/macOS/Linux:**
40
+ ```bash
41
+ # Clone the repository
42
+ git clone https://github.com/n-orrow/vnxt.git
43
+ cd vnxt
44
+
45
+ # Install globally via npm link
46
+ chmod +x vnxt.js
47
+ npm link
48
+ ```
49
+
50
+ **PowerShell/Windows:**
51
+ ```powershell
52
+ # Clone the repository
53
+ git clone https://github.com/n-orrow/vnxt.git
54
+ cd vnxt
55
+
56
+ # Install globally via npm link
57
+ npm link
58
+ ```
59
+
60
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Usage
61
+
62
+ ### Basic Examples
63
+
64
+ **Bash/PowerShell:**
65
+ ```bash
66
+ # Simple version bump (auto-detects patch from "fix:")
67
+ vnxt -m "fix: resolve RFID reader bug"
68
+ # or use the shorter alias:
69
+ vx -m "fix: resolve RFID reader bug"
70
+
71
+ # Feature addition (auto-detects minor from "feat:")
72
+ vx -m "feat: add heatmap visualization"
73
+
74
+ # Breaking change (auto-detects major from "BREAKING")
75
+ vx -m "BREAKING: redesign API structure"
76
+
77
+ # With changelog and push to remote
78
+ vx -m "feat: add new dashboard" -c -p
79
+
80
+ # Interactive mode (prompts for input)
81
+ vx
82
+ ```
83
+
84
+ ### Command Line Options
85
+
86
+ All options work with both `vnxt` and `vx`:
87
+
88
+ ```
89
+ -m, --message <msg> Commit message (required unless using interactive mode)
90
+ -t, --type <type> Version type: patch, minor, major (auto-detected from message)
91
+ -v, --version <ver> Set specific version (e.g., 2.0.0-beta.1)
92
+ -V, --version Show vnxt version
93
+ -p, --push Push to remote with tags
94
+ -dnp, --no-push Prevent auto-push (overrides config)
95
+ -c, --changelog Update CHANGELOG.md
96
+ -d, --dry-run Show what would happen without making changes
97
+ -a, --all [mode] Stage files before versioning (prompts if no mode)
98
+ Modes: tracked, all, interactive (i), patch (p)
99
+ -r, --release Generate release notes file
100
+ -q, --quiet Minimal output (errors only)
101
+ -h, --help Show help message
102
+ ```
103
+
104
+ ### Automatic Version Detection
105
+
106
+ vnxt automatically detects the version bump type from your commit message:
107
+
108
+ - `major:` → **major** version bump
109
+ - `minor:` → **minor** version bump
110
+ - `patch:` → **patch** version bump
111
+ - `feat:` or `feature:` → **minor** version bump
112
+ - `fix:` → **patch** version bump
113
+ - `BREAKING:` or contains `BREAKING` → **major** version bump
114
+
115
+ You can override this with the `-t` flag.
116
+
117
+ ### Dry Run
118
+
119
+ Preview what will happen without making changes:
120
+
121
+ **Bash/PowerShell:**
122
+ ```bash
123
+ vx -m "feat: new feature" -d
124
+ ```
125
+
126
+ Output:
127
+ ```
128
+ 🔬 DRY RUN MODE - No changes will be made
129
+
130
+ Would perform the following actions:
131
+ 1. Bump minor version
132
+ 2. Commit with message: "feat: new feature"
133
+ 3. Create git tag with annotation
134
+ 4. (Skipping push - use --push to enable)
135
+
136
+ ✓ Dry run complete. Use without -d to apply changes.
137
+ ```
138
+
139
+ ### Custom Versions
140
+
141
+ Set a specific version number (useful for pre-releases):
142
+
143
+ **Bash/PowerShell:**
144
+ ```bash
145
+ vx -v 2.0.0-beta.1 -m "beta: initial release candidate"
146
+ vx -v 1.5.0-rc.2 -m "release candidate 2"
147
+ ```
148
+
149
+ ### Changelog Generation
150
+
151
+ Automatically update CHANGELOG.md with version history:
152
+
153
+ **Bash/PowerShell:**
154
+ ```bash
155
+ vx -m "feat: add user authentication" -c
156
+ ```
157
+
158
+ Creates/updates CHANGELOG.md:
159
+ ```markdown
160
+ # Changelog
161
+
162
+ ## [1.2.0] - 2024-02-10
163
+ - feat: add user authentication
164
+
165
+ ## [1.1.0] - 2024-02-09
166
+ - feat: add dashboard
167
+ ```
168
+
169
+ ### Release Notes
170
+
171
+ Generate a formatted release notes file:
172
+
173
+ **Bash/PowerShell:**
174
+ ```bash
175
+ vx -m "feat: major feature release" -r
176
+ ```
177
+
178
+ Creates `release-notes-v1.2.0.md`:
179
+ ```markdown
180
+ # Release v1.2.0
181
+
182
+ Released: 2024-02-10
183
+
184
+ ## Changes
185
+ feat: major feature release
186
+
187
+ ## Installation
188
+ npm install your-package@1.2.0
189
+ ```
190
+
191
+ ### File Staging Options
192
+
193
+ vnxt offers flexible file staging with the `-a` flag:
194
+
195
+ **Bash/PowerShell:**
196
+ ```bash
197
+ # Interactive prompt (asks which mode to use)
198
+ vx -m "chore: update" -a
199
+
200
+ # Specific modes
201
+ vx -m "fix: bug" -a tracked # Stage tracked files only (git add -u)
202
+ vx -m "feat: new" -a all # Stage all changes (git add -A)
203
+ vx -m "refactor: code" -a i # Interactive selection (git add -i)
204
+ vx -m "fix: typo" -a p # Patch mode (git add -p)
205
+ ```
206
+
207
+ **Staging Modes:**
208
+ - `tracked` - Only staged tracked files that have been modified/deleted (default)
209
+ - `all` - Stages all changes, respects `.gitignore` for new files
210
+ - `interactive` or `i` - Opens git's interactive staging mode
211
+ - `patch` or `p` - Opens patch mode for selective staging
212
+
213
+ **Note:** If you run `vx` without any files staged and without the `-a` flag, vnxt will prompt you interactively to choose a staging mode.
214
+
215
+ ### Quiet Mode
216
+
217
+ Minimize terminal output for CI/CD environments:
218
+
219
+ **Bash/PowerShell:**
220
+ ```bash
221
+ vx -m "feat: new feature" -q
222
+ ```
223
+
224
+ In quiet mode:
225
+ - ✅ Errors still display
226
+ - ❌ Progress messages hidden
227
+ - ❌ Summary stats hidden
228
+ - ❌ Git diff output hidden
229
+
230
+ Perfect for automated workflows where you only want to see failures.
231
+
232
+ ### Check Version
233
+
234
+ Display the installed vnxt version:
235
+
236
+ **Bash/PowerShell:**
237
+ ```bash
238
+ vx -V
239
+ # or
240
+ vnxt --version
241
+ ```
242
+
243
+ Output:
244
+ ```
245
+ vnxt v1.7.0
246
+ ```
247
+
248
+ ### Complete Workflow Example
249
+
250
+ **Bash/PowerShell:**
251
+ ```bash
252
+ # Make changes to your code
253
+ # ...
254
+
255
+ # Dry run to preview
256
+ vx -m "feat: add new API endpoint" -d
257
+
258
+ # Execute with changelog, release notes, and push
259
+ vx -m "feat: add new API endpoint" -c -r -p
260
+ ```
261
+
262
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Configuration
263
+
264
+ Create a `.vnxtrc.json` file in your project root to set defaults:
265
+ ```json
266
+ {
267
+ "autoChangelog": true,
268
+ "defaultType": "patch",
269
+ "requireCleanWorkingDir": false,
270
+ "autoPush": true,
271
+ "defaultStageMode": "tracked",
272
+ "tagPrefix": "v",
273
+ "colors": true
274
+ }
275
+ ```
276
+
277
+ ### Configuration Options
278
+
279
+ | Option | Type | Default | Description |
280
+ |--------|------|---------|-------------|
281
+ | `autoChangelog` | boolean | `true` | Automatically update CHANGELOG.md on every bump |
282
+ | `defaultType` | string | `"patch"` | Default version bump type if not auto-detected |
283
+ | `requireCleanWorkingDir` | boolean | `false` | Require clean git working directory before bumping |
284
+ | `autoPush` | boolean | `true` | Automatically push to remote after bumping |
285
+ | `defaultStageMode` | string | `"tracked"` | Default staging mode when using `-a` flag |
286
+ | `tagPrefix` | string | `"v"` | Prefix for git tags (e.g., "v1.2.3") |
287
+ | `colors` | boolean | `true` | Enable colored terminal output |
288
+
289
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Pre-flight Checks
290
+
291
+ vnxt performs several checks before making changes:
292
+
293
+ - ✅ Verifies no uncommitted changes (unless using `-a`)
294
+ - ✅ Warns if not on main/master branch
295
+ - ✅ Checks for remote repository (if pushing)
296
+
297
+ Example output:
298
+ ```
299
+ 🔍 Running pre-flight checks...
300
+
301
+ ⚠️ Warning: You're on branch 'feature/new-dashboard', not main/master
302
+ ✅ Pre-flight checks passed
303
+ ```
304
+
305
+ ## Interactive Mode
306
+
307
+ Run `vnxt` (or `vx`) without arguments for guided prompts:
308
+
309
+ **Bash/PowerShell:**
310
+ ```bash
311
+ vx
312
+ ```
313
+
314
+ Output:
315
+ ```
316
+ 🤔 Interactive mode
317
+
318
+ Commit message: feat: add new feature
319
+ Version type (patch/minor/major) [patch]: minor
320
+
321
+ 📝 Auto-detected: minor version bump (feature)
322
+
323
+ 🔍 Running pre-flight checks...
324
+ ...
325
+ ```
326
+
327
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Workflow Examples
328
+
329
+ ### Quick Fix
330
+
331
+ **Bash/PowerShell:**
332
+ ```bash
333
+ vx -m "fix: resolve login bug"
334
+ ```
335
+
336
+ ### Feature Release
337
+
338
+ **Bash/PowerShell:**
339
+ ```bash
340
+ vx -m "feat: add dashboard analytics" -c -p
341
+ ```
342
+
343
+ ### Major Release with Full Documentation
344
+
345
+ **Bash/PowerShell:**
346
+ ```bash
347
+ vx -m "BREAKING: new API structure" -c -r -p
348
+ ```
349
+
350
+ ### Local Development (No Push)
351
+
352
+ **Bash/PowerShell:**
353
+ ```bash
354
+ vx -m "chore: refactor code" -a
355
+ ```
356
+
357
+ ### CI/CD Pipeline
358
+
359
+ **Bash/PowerShell:**
360
+ ```bash
361
+ # Quiet mode - only shows errors
362
+ vx -m "chore: automated update" -q
363
+ ```
364
+
365
+ ### Check Installed Version
366
+
367
+ **Bash/PowerShell:**
368
+ ```bash
369
+ vx -V
370
+ ```
371
+
372
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Troubleshooting
373
+
374
+ ### Not a Git Repository
375
+
376
+ If you see this error:
377
+ ```
378
+ ❌ Not a git repository. Run `git init` first.
379
+ ```
380
+
381
+ You're trying to use vnxt in a directory that isn't a git repository. Initialize git first:
382
+
383
+ **Bash/PowerShell:**
384
+ ```bash
385
+ git init
386
+ ```
387
+
388
+ ### Permission Denied (Windows PowerShell)
389
+
390
+ If you get execution policy errors:
391
+ ```powershell
392
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
393
+ ```
394
+
395
+ ### Uncommitted Changes Error
396
+
397
+ Either commit your changes first, or use the `-a` flag to stage all changes:
398
+
399
+ **Bash/PowerShell:**
400
+ ```bash
401
+ vx -m "your message" -a
402
+ ```
403
+
404
+ ### Command Not Found After Installation
405
+
406
+ Make sure npm's global bin directory is in your PATH:
407
+
408
+ **Bash:**
409
+ ```bash
410
+ npm config get prefix
411
+ # Add the bin subdirectory to your PATH
412
+ ```
413
+
414
+ **PowerShell:**
415
+ ```powershell
416
+ npm config get prefix
417
+ # Add the bin subdirectory to your PATH in System Environment Variables
418
+ ```
419
+
420
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Requirements
421
+
422
+ - Node.js 12.x or higher
423
+ - npm 6.x or higher
424
+ - Git installed and configured
425
+
426
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Version Management
427
+
428
+ This project uses [vnxt](https://vnxt.dev) for version bumping with the following configuration:
429
+
430
+ - Auto-push enabled (`autoPush: true`)
431
+ - Auto-changelog enabled (`autoChangelog: true`)
432
+ - Clean working directory not required (`requireCleanWorkingDir: false`)
433
+
434
+ See `.vnxtrc.json` for full configuration.
435
+
436
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Author
437
+
438
+ Nate Orrow - Software Developer
439
+
440
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> License
441
+
442
+ MIT License - see [LICENSE](LICENSE) file for details
443
+
444
+ ## <img src="./docs/logos/caret-38x38.png" width="24" align="center"> Contributing
445
+
446
+ Contributions are welcome! Please feel free to submit a Pull Request.
447
+
448
+ 1. Fork the repository
449
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
450
+ 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
451
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
452
452
  5. Open a Pull Request
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
- {
2
- "name": "vnxt",
3
- "version": "1.7.7",
4
- "description": "Version incrementation CLI tool with built in git commit, push and changelog generation",
5
- "main": "vnxt.js",
6
- "bin": {
7
- "vnxt": "./vnxt.js",
8
- "vx": "./vnxt.js"
9
- },
10
- "scripts": {
11
- "test": "jest",
12
- "release": "vnxt -m 'release' -c -p"
13
- },
14
- "keywords": [
15
- "version",
16
- "bump",
17
- "semver",
18
- "git",
19
- "changelog",
20
- "cli",
21
- "release",
22
- "npm"
23
- ],
24
- "author": "Nate Orrow | Nate@Orrow.uk",
25
- "license": "MIT",
26
- "repository": {
27
- "type": "git",
28
- "url": "https://github.com/n-orrow/vnxt.git"
29
- },
30
- "bugs": {
31
- "url": "https://github.com/n-orrow/vnxt/issues"
32
- },
33
- "homepage": "https://vnxt.dev",
34
- "engines": {
35
- "node": ">=12.0.0"
36
- },
37
- "files": [
38
- "vnxt.js",
39
- ".vnxtrc.json",
40
- "README.md",
41
- "LICENSE"
42
- ],
43
- "devDependencies": {
44
- "jest": "^29.7.0"
45
- }
46
- }
1
+ {
2
+ "name": "vnxt",
3
+ "version": "1.8.0",
4
+ "description": "Version incrementation CLI tool with built in git commit, push and changelog generation",
5
+ "main": "vnxt.js",
6
+ "bin": {
7
+ "vnxt": "vnxt.js",
8
+ "vx": "vnxt.js"
9
+ },
10
+ "scripts": {
11
+ "test": "jest",
12
+ "release": "vnxt -m 'release' -c -p"
13
+ },
14
+ "keywords": [
15
+ "version",
16
+ "bump",
17
+ "semver",
18
+ "git",
19
+ "changelog",
20
+ "cli",
21
+ "release",
22
+ "npm"
23
+ ],
24
+ "author": "Nate Orrow | Nate@Orrow.uk",
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/n-orrow/vnxt.git"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/n-orrow/vnxt/issues"
32
+ },
33
+ "homepage": "https://vnxt.dev",
34
+ "engines": {
35
+ "node": ">=12.0.0"
36
+ },
37
+ "files": [
38
+ "vnxt.js",
39
+ ".vnxtrc.json",
40
+ "README.md",
41
+ "LICENSE"
42
+ ],
43
+ "devDependencies": {
44
+ "jest": "^29.7.0"
45
+ }
46
+ }
package/vnxt.js CHANGED
@@ -9,7 +9,7 @@ const colors = {
9
9
  reset: '\x1b[0m',
10
10
  bright: '\x1b[1m',
11
11
  dim: '\x1b[2m',
12
-
12
+
13
13
  // Foreground colors
14
14
  red: '\x1b[31m',
15
15
  green: '\x1b[32m',
@@ -98,6 +98,7 @@ let customVersion = getFlag('--version', '-v');
98
98
  let dryRun = hasFlag('--dry-run', '-d');
99
99
  let noPush = hasFlag('--no-push', '-dnp');
100
100
  let push = noPush ? false : (hasFlag('--push', '-p') || config.autoPush);
101
+ let publishToNpm = hasFlag('--publish');
101
102
  let generateChangelog = hasFlag('--changelog', '-c') || config.autoChangelog;
102
103
  const addAllFlag = getFlag('--all', '-a');
103
104
  let addMode = null;
@@ -389,6 +390,14 @@ See [CHANGELOG.md](./CHANGELOG.md) for complete version history.
389
390
  if (push) {
390
391
  log('🚀 Pushing to remote...', 'cyan');
391
392
  execSync('git push --follow-tags', {stdio: quietMode ? 'pipe' : 'inherit'});
393
+
394
+ // If --publish flag, also push a publish/v* tag to trigger npm workflow
395
+ if (publishToNpm) {
396
+ log('📦 Pushing publish tag to trigger npm release...', 'cyan');
397
+ const publishTag = `publish/${config.tagPrefix}${newVersion}`;
398
+ execSync(`git tag ${publishTag}`, {stdio: 'pipe'});
399
+ execSync(`git push origin ${publishTag}`, {stdio: quietMode ? 'pipe' : 'inherit'});
400
+ }
392
401
  }
393
402
 
394
403
  // STATS/SUMMARY
@@ -410,6 +419,9 @@ See [CHANGELOG.md](./CHANGELOG.md) for complete version history.
410
419
 
411
420
  if (push) {
412
421
  log(`🚀 Remote: Pushed with tags`, 'green');
422
+ if (publishToNpm) {
423
+ log(`📦 npm: Publishing triggered (publish/${config.tagPrefix}${newVersion})`, 'green');
424
+ }
413
425
  } else {
414
426
  log(`📍 Remote: Not pushed (use --push to enable)`, 'gray');
415
427
  }
@@ -446,6 +458,7 @@ Options:
446
458
  -V, --version Show vnxt version
447
459
  -p, --push Push to remote with tags
448
460
  -dnp, --no-push Prevent auto-push (overrides config)
461
+ --publish Push and trigger npm publish via GitHub Actions
449
462
  -c, --changelog Update CHANGELOG.md
450
463
  -d, --dry-run Show what would happen without making changes
451
464
  -a, --all [mode] Stage files before versioning
@@ -488,10 +501,11 @@ Examples:
488
501
  vx -m "fix: bug" -a i # Interactive git add
489
502
  vx -m "fix: bug" -a p # Patch mode
490
503
  vx -m "fix: bug" -q # Quiet mode (minimal output)
504
+ vx -m "feat: new feature" --publish # Bump, push and trigger npm publish
491
505
  vx # Interactive mode
492
506
  `);
493
507
  process.exit(0);
494
508
  }
495
509
 
496
510
  // Run main function
497
- main();
511
+ main();