npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aglstudio/versionbumper

v0.3.0

Published

A simple cli tool to help you better track versions in your project

Downloads

29

Readme

versionBumper

versionBumper is a simple CLI tool designed to help you manage and track versions in your project. It automates the process of updating version numbers in your package.json and optionally in your .env file, and it also commits and pushes these changes to your Git repository.

Features

  • Increment version numbers in package.json (major, minor, patch).
  • Optionally update version numbers in a specified .env file.
  • Support for multiple subprojects within a monorepo structure.
  • Ability to update specific projects independently with different version numbers.
  • Automatically commit and push changes to your Git repository with a custom commit message.
  • Configurable through a versionBump.conf.json file.

Installation

To install versionBumper, you need to have Node.js and npm installed. Then, you can install it globally using npm:

npm install -g @aglstudio/versionbumper
or
npm install @aglstudio/versionbumper --save-dev

Configuration

You can configure versionBumper using a versionBump.conf.json file in the root of your project. Here is an example configuration:

{
  "changeEnv": true,
  "envVersionValue": "VERSION",
  "envVersionFile": ".env"
}

For more advanced configurations with subprojects:

{
  "files": [
    {
      "path": "package.json",
      "type": "json",
      "field": "version"
    },
    {
      "path": ".env",
      "type": "env",
      "key": "VERSION"
    }
  ],
  "subprojects": [
    {
      "dir": "client",
      "files": [
        {
          "path": "package.json",
          "type": "json",
          "field": "version"
        },
        {
          "path": ".env",
          "type": "env",
          "key": "NEXT_PUBLIC_VERSION"
        }
      ]
    },
    {
      "dir": "server",
      "files": [
        {
          "path": "package.json",
          "type": "json",
          "field": "version"
        },
        {
          "path": ".env",
          "type": "env",
          "key": "API_VERSION"
        }
      ]
    }
  ],
  "skipGitCheck": true
}

Configuration options:

  • changeEnv: (boolean) Whether to update the version in the .env file.
  • envVersionValue: (string) The key in the .env file that holds the version number.
  • envVersionFile: (string) The path to the .env file.
  • files: (array) List of files to update in the root directory.
  • subprojects: (array) List of subprojects with their own files to update.
    • dir: (string) The directory containing the subproject.
    • files: (array) List of files to update in the subproject.
  • skipGitCheck: (boolean) Skip Git operations.

Usage

To use versionBumper, navigate to your project directory and run:

versionBumper [options]

Options:

  • --config, -c: Specify a custom path to the configuration file (default: versionBump.conf.json)
  • --project, -p: Specify which project(s) to update. Can be used multiple times for multiple projects. Use 'main' for the root project. If not specified, all projects will be prompted for selection.

Examples:

versionBumper
versionBumper --config ./config/my-version-bump.json
versionBumper -c ../shared-config.json
versionBumper --project client
versionBumper -p client -p server

You will be prompted to select the type of version change (major, minor, patch) and to enter a commit message. If changeEnv is not specified in the configuration file, you will also be asked if you want to update the .env file.

If you have subprojects defined and don't specify which projects to update via command line, you'll be prompted to select which projects should be updated.

Example

  • Run the command:
versionBumper
  • Select the type of version change:
? What type of change? (Use arrow keys)
❯ major
  minor
  patch
  • If you have subprojects, you'll be prompted to select which ones to update:
? Which projects to update? (Press <space> to select, <a> to toggle all, <i> to invert selection)
❯ ◉ main
  ◉ client
  ◉ server
  • Enter the commit message:
? Enter the commit message: Updated version to 1.0.0

If changeEnv is not specified in the configuration file, you will be asked:

? Do you want to update the .env file? (Y/n)

How It Works

  • Configuration Check: The tool reads the configuration from versionBump.conf.json using the checkForConf function.
  • Project Selection: It determines which projects to update based on command line arguments or interactive prompts.
  • Version Update: It updates the version in package.json and other specified files independently for each selected project.
  • Environment File Update: If configured, it updates the version in the .env file using the updateEnv function.
  • Git Operations: It commits and pushes the changes to the Git repository with version information for each updated project.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the ISC License. See the LICENSE file for details.

Contact

For any questions or issues, please open an issue on GitHub.

Acknowledgements

  • inquirer
  • simple-git