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