Socket
Book a DemoInstallSign in
Socket

@stacksjs/bumpx

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacksjs/bumpx

Automatically bump your versions.

latest
Source
npmnpm
Version
0.1.78
Version published
Maintainers
1
Created
Source

Social Card of this repo

npm version GitHub Actions Commitizen friendly

bumpx

A powerful, modern version bumping tool with comprehensive Git integration, workspace detection, and monorepo support.

Features

  • πŸš€ Zero dependencies - Built using only Node.js built-ins and Bun tooling
  • πŸ“¦ Semver compliant - Supports all semantic versioning release types
  • πŸ”„ Workspace detection - Automatic workspace/monorepo detection with recursive enabled by default
  • 🎯 Git integration - Automatic commit, tag, and push (all enabled by default)
  • ⚑ Fast execution - Compiled binary for instant startup
  • πŸ›  Highly configurable - Config file and CLI options
  • 🎨 Interactive prompts - Choose version increment interactively
  • πŸ”§ Custom commands - Execute scripts before git operations
  • πŸ“ Changelog generation - Automatic changelog generation enabled by default
  • 🌐 Cross-platform - Works seamlessly on macOS, Linux, and Windows

Installation

# Install globally
bun install -g @stacksjs/bumpx

# Or use with bunx
bunx @stacksjs/bumpx patch

Usage

Basic Usage

# Bump patch version (1.0.0 β†’ 1.0.1)
bumpx patch

# Bump minor version (1.0.0 β†’ 1.1.0)
bumpx minor

# Bump major version (1.0.0 β†’ 2.0.0)
bumpx major

# Bump to specific version
bumpx 1.2.3

# Interactive version selection
bumpx prompt

Prerelease Versions

# Bump to prerelease
bumpx prepatch --preid beta  # 1.0.0 β†’ 1.0.1-beta.0
bumpx preminor --preid alpha # 1.0.0 β†’ 1.1.0-alpha.0
bumpx premajor --preid rc    # 1.0.0 β†’ 2.0.0-rc.0

# Increment prerelease
bumpx prerelease  # 1.0.1-beta.0 β†’ 1.0.1-beta.1

Git Integration

# Default behavior: commit, tag, and push (all enabled by default)
bumpx patch

# Disable specific git operations
bumpx patch --no-commit --no-tag --no-push

# Custom commit message
bumpx patch --commit-message "chore: release v{version}"

# Custom tag message
bumpx patch --tag-message "Release v{version}"

# Sign commits and tags
bumpx patch --sign

# Skip git hooks
bumpx patch --no-verify

Workspace & Monorepo Support

# Automatic workspace detection (recursive is default)
bumpx patch

# Explicitly disable recursive mode
bumpx patch --no-recursive

# Bump specific files
bumpx patch --files package.json,packages/*/package.json

Advanced Options

# Execute custom commands
bumpx patch --execute "bun run build" --execute "bun test"

# Install dependencies after bump
bumpx patch --install

# Skip confirmation prompts
bumpx patch --yes

# CI mode (non-interactive, quiet)
bumpx patch --ci

# Print recent commits
bumpx patch --print-commits

# Skip git status check
bumpx patch --no-git-check

# Generate changelog (enabled by default)
bumpx patch --changelog

# Disable changelog generation
bumpx patch --no-changelog

# Dry run to preview changes
bumpx patch --dry-run

CI/CD Integration

bumpx is designed to work seamlessly in CI/CD environments:

Quick CI Usage

# CI mode - automatically non-interactive
bumpx patch --ci

# Or with explicit flags
bumpx patch --yes --quiet

# Auto-detect CI environment
export CI=true
bumpx patch  # Automatically enables CI mode

GitHub Actions Example

name: Release
on:
  workflow_dispatch:
    inputs:
      release_type:
        description: Release type
        required: true
        default: patch
        type: choice
        options: [patch, minor, major]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          fetch-depth: 0

      - uses: oven-sh/setup-bun@v1

      - name: Install dependencies
        run: bun install

      - name: Configure git
        run: |
          git config --global user.name "github-actions[bot]"
          git config --global user.email "github-actions[bot]@users.noreply.github.com"

      - name: Version bump and release
        run: bunx bumpx ${{ github.event.inputs.release_type }} --ci

For more CI/CD examples and configurations, see Automation Guide.

Configuration

Create a bumpx.config.ts file in your project root:

import { defineConfig } from '@stacksjs/bumpx'

export default defineConfig({
  // Git options (these are the defaults)
  commit: true,
  tag: true,
  push: true,
  sign: false,

  // Execution options
  install: false,
  execute: ['bun run build', 'bun run test'],

  // UI options
  confirm: true,
  quiet: false,

  // Advanced options
  recursive: true, // Default is now true with workspace detection
  printCommits: true,
  changelog: true, // Changelog generation enabled by default
  respectGitignore: true
})

You can also use JSON configuration in package.json:

{
  "bumpx": {
    "commit": true,
    "tag": true,
    "push": true,
    "execute": ["bun run build"]
  }
}

CLI Options

OptionAliasDescriptionDefault
--preidID for prerelease
--allInclude all filesfalse
--no-git-checkSkip git status check
--commit [msg]-cCreate git committrue
--no-commitSkip git commit
--tag [name]-tCreate git tagtrue
--no-tagSkip git tag
--push-pPush to remotetrue
--no-pushSkip git push
--signSign commits and tagsfalse
--installRun npm installfalse
--execute-xExecute command
--recursive-rBump recursivelytrue
--yes-ySkip confirmationfalse
--quiet-qQuiet modefalse
--ciCI mode (sets --yes --quiet)false
--no-verifySkip git hooksfalse
--ignore-scriptsIgnore npm scriptsfalse
--current-versionOverride current version
--print-commitsShow recent commitsfalse

Library Usage

You can also use bumpx programmatically:

import { versionBump } from '@stacksjs/bumpx'

await versionBump({
  release: 'patch',
  commit: true,
  tag: true,
  push: true,
  progress: ({ event, newVersion }) => {
    console.log(`${event}: ${newVersion}`)
  }
})

Changelog

Please see our releases page for information on changes.

Contributing

Please see CONTRIBUTING for details.

Community

For help or discussion:

Postcardware

β€œSoftware that is free, but hopes for a postcard.” We love receiving postcards from around the world showing where Stacks is being used! We showcase them on our website too.

Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎

Credits

Sponsors

We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.

License

The MIT License (MIT). Please see LICENSE for more information.

Made with πŸ’™

Keywords

version

FAQs

Package last updated on 02 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.