monorepo-version-cli
v1.0.1
Published
A generic CLI tool to update package versions in any monorepo
Maintainers
Readme
Monorepo Version Manager (mver)
A simple, interactive CLI tool to update package versions across your monorepo. It automatically detects your packages and lets you select which ones to update using a clean terminal interface.
Features
- 🔍 Auto-Discovery: Automatically finds packages using
pnpm-workspace.yaml,package.jsonworkspaces, orlerna.json. - 🛡️ Safer: Interactive selection prevents accidental updates to the wrong packages.
- ⚡ Fast: Built with
fast-globfor quick scanning of large repositories. - 🎨 Clean UI: Minimalist terminal user interface.
Installation
Option 1: Install Globally (Recommended)
Installing globally makes the mver command available anywhere in your terminal.
# Clone this repository or navigate to it
cd /path/to/monorepo-version-cli
# Install globally
npm install -g .Option 2: Run via npx (Without Installing)
If you don't want to install it globally, you can run it directly from the source directory:
# From within the tool's directory
node index.jsOr if you publish this to a registry later, you could use npx.
Usage
Navigate to the root directory of your monorepo (e.g.,
applift-app).Run the command:
mverSelect Packages: Use the Spacebar to toggle selection of packages. Use Enter to confirm.
Enter Version: Type the new version number (e.g.,
1.2.0) and press Enter.
The tool will update the version field in the package.json of all selected packages.
How it detects packages
The tool attempts to find your packages in the following order:
- pnpm-workspace.yaml: Checks the
packageslist. - package.json: Checks the
workspacesfield. - lerna.json: Checks the
packageslist. - Fallback: If no config is found, it looks in
packages/*,apps/*,libs/*, andservices/*.
Development
If you want to modify or improve the tool:
- Install dependencies:
npm install - Run the tool locally:
node index.js
