@matrix-rex/release-tool
v1.3.0
Published
Simplified release wizard for Node.js projects
Readme
@matrix-rex/release-tool
An interactive release wizard for Node.js projects — bump version, commit, tag, and push in one command.
Features
- ✅ Checks for uncommitted changes before doing anything
- ✅ Detects version mismatch between
package.jsonand Git tags and lets you resolve it - ✅ Optional build check — run
pnpm buildbefore releasing to ensure stability - ✅ Bumps version —
patch,minor, ormajor - ✅ Accepts a custom commit message (or uses a sensible auto-generated one)
- ✅ Automatically commits, tags, and pushes to
origin - ✅ Works in any Node.js project with a
package.jsonand Git repository
Installation
Global
You can install it globally to use it in any project:
# Using pnpm (recommended)
pnpm add -g @matrix-rex/release-tool
# Using npm
npm install -g @matrix-rex/release-tool
# Using yarn
yarn global add @matrix-rex/release-toolRun without installing
npx @matrix-rex/release-toolLocal Dev Dependency
If you want to keep the version locked to a specific project:
pnpm add -D @matrix-rex/release-toolThen add it to your package.json scripts:
"scripts": {
"release": "release-it"
}Now you can run it via pnpm release.
Usage
Navigate to any Node.js project folder and run:
release-itThe wizard will guide you through:
--- Release It ---
Current Package Version: v1.2.3
Latest Git Tag: v1.2.3
? Select release type:
❯ Patch (0.0.x)
Minor (0.x.0)
Major (x.0.0)
Quit
? Enter commit message (leave blank for auto: 'patch release vX.X.X'):
? Run build check before releasing? (y/N)
? Ready to release patch? (Y/n)
Running build...
✔ Build successful!
Bumping version...
New Version: v1.2.4
Pushing changes and tags to origin...
✨ Release v1.2.4 successful! GitHub Actions check has started.How It Works
- Checks for uncommitted changes — aborts if the working tree is dirty
- Reads the current version from
package.jsonand the latest Git tag - Detects mismatches — if they differ, asks which to use as the base
- Runs build check (Optional) — if confirmed, runs
pnpm buildto verify the build is stable before releasing - Bumps the version via
pnpm version(updatespackage.json+ creates a Git tag) - Pushes the commit and tag to
origin
Local Development
Clone and link locally to test changes immediately:
git clone https://github.com/matrix-rex/release-tool.git
cd release-tool
npm linkThe release-it command will now point to your local clone. Any edits to bin/release.js are reflected instantly.
Built With
| Package | Purpose | | ------------------------------------------------------ | ------------------------- | | enquirer | Interactive prompts | | picocolors | Terminal colors | | execa | Running git/pnpm commands |
License
MIT © Matrix Rex
