{"id":13902871,"url":"https://github.com/JS-DevTools/version-bump-prompt","last_synced_at":"2025-07-18T00:32:22.571Z","repository":{"id":27689354,"uuid":"31175866","full_name":"JS-DevTools/version-bump-prompt","owner":"JS-DevTools","description":"Interactive CLI that bumps your version numbers and more","archived":false,"fork":false,"pushed_at":"2022-09-16T08:09:55.000Z","size":1067,"stargazers_count":282,"open_issues_count":8,"forks_count":34,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-10T21:30:57.229Z","etag":null,"topics":["cli","javascript","nodejs","semantic-versioning","semver","version","versioning"],"latest_commit_sha":null,"homepage":"https://jstools.dev/version-bump-prompt/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JS-DevTools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-22T19:17:44.000Z","updated_at":"2025-04-07T15:02:54.000Z","dependencies_parsed_at":"2022-07-14T04:20:31.725Z","dependency_job_id":null,"html_url":"https://github.com/JS-DevTools/version-bump-prompt","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/JS-DevTools/version-bump-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fversion-bump-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fversion-bump-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fversion-bump-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fversion-bump-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JS-DevTools","download_url":"https://codeload.github.com/JS-DevTools/version-bump-prompt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fversion-bump-prompt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265636529,"owners_count":23802549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","javascript","nodejs","semantic-versioning","semver","version","versioning"],"created_at":"2024-08-06T22:01:28.589Z","updated_at":"2025-07-18T00:32:22.254Z","avatar_url":"https://github.com/JS-DevTools.png","language":"JavaScript","readme":"# Version Bump Prompt\n\n[![Cross-Platform Compatibility](https://jstools.dev/img/badges/os-badges.svg)](https://github.com/JS-DevTools/version-bump-prompt/actions)\n[![Build Status](https://github.com/JS-DevTools/version-bump-prompt/workflows/CI-CD/badge.svg)](https://github.com/JS-DevTools/version-bump-prompt/actions)\n\n[![Coverage Status](https://coveralls.io/repos/github/JS-DevTools/version-bump-prompt/badge.svg?branch=master)](https://coveralls.io/github/JS-DevTools/version-bump-prompt)\n[![Dependencies](https://david-dm.org/JS-DevTools/version-bump-prompt.svg)](https://david-dm.org/JS-DevTools/version-bump-prompt)\n\n[![npm](https://img.shields.io/npm/v/@jsdevtools/version-bump-prompt.svg)](https://www.npmjs.com/package/@jsdevtools/version-bump-prompt)\n[![License](https://img.shields.io/npm/l/@jsdevtools/version-bump-prompt.svg)](LICENSE)\n[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/JS-DevTools/version-bump-prompt)\n\n![Screenshot](https://jstools.dev/version-bump-prompt/img/screenshot.gif)\n\n\n\n### Automate your release process with a single command that can:\n\n- Prompt for the type of version bump\n\n- Bump the version number **any** file, including:\n    -  `package.json`\n    -  `package-lock.json`\n    -  config files\n    -  source code files\n    -  ReadMe files\n    -  license files\n\n- Run your `preversion`, `version`, and `postversion` scripts\n\n- Commit changes to git\n\n- Tag the commit with the version number\n\n- Push the commit to remote\n\n\n\nInstallation\n--------------------------\nYou can install `version-bump-prompt` via [npm](https://docs.npmjs.com/about-npm/).\n\n```bash\nnpm install -g @jsdevtools/version-bump-prompt\n```\n\n\n\nUsage\n--------------------------\n\n```\nbump [release] [options] [files...]\n\nAutomatically (or with prompts) bump your version number, commit changes, tag, and push to Git\n\nrelease:\n  The release version or type.  Can be one of the following:\n   - A semver version number (ex: 1.23.456)\n   - prompt: Prompt for the version number (this is the default)\n   - major: Increase major version\n   - minor: Increase minor version\n   - patch: Increase patch version\n   - premajor: Increase major version, pre-release\n   - preminor: Increase preminor version, pre-release\n   - prepatch: Increase prepatch version, pre-release\n   - prerelease: Increase prerelease version\n\noptions:\n  --preid \u003cname\u003e            The identifier for prerelease versions.\n                            Defaults to \"beta\".\n\n  -c, --commit [message]    Commit changed files to Git.\n                            Defaults to \"release vX.X.X\".\n\n  -t, --tag [tag]           Tag the commit in Git.\n                            The Default tag is \"vX.X.X\"\n\n  -p, --push                Push the Git commit.\n\n  -a, --all                 Commit/tag/push ALL pending files,\n                            not just the ones that were bumped.\n                            (same as \"git commit -a\")\n\n  --no-verify               Bypass Git commit hooks\n                            (same as \"git commit --no-verify\")\n\n  -v, --version             Show the version number\n\n  -q, --quiet               Suppress unnecessary output\n\n  -h, --help                Show usage information\n\n  --ignore-scripts          Bypass version scripts\n\nfiles...\n  One or more files and/or globs to bump (ex: README.md *.txt docs/**/*).\n  Defaults to package.json and package-lock.json.\n```\n\n\n\nExamples\n--------------------------\n\n### Default Behavior (no arguments)\n\n```\nbump\n```\n\nWhen run without any arguments, the `bump` command will do the following:\n\n- Prompt the user to select the bump type (major, minor, prerelease, etc.)\n- Update the version number in `package.json` and `package-lock.json`\n- Run any [npm version scripts](https://docs.npmjs.com/cli/version.html) (`preversion`, `version`, or `postversion`)\n- It will **NOT** commit, tag, or push to git.\n\n\n### Bump Without Prompting\nYou can specify an explicit version number:\n\n```\nbump 1.23.456\nbump 1.23.456-beta.1\n```\n\nOr you can specify a release type:\n\n```\nbump major\nbump patch\nbump prerelease\n```\n\nFor pre-releases, the default identifier is \"beta\".  You can change it using the `--preid` argument:\n\n```\nbump premajor --preid alpha\n```\n\nAll of the above commands do the following:\n\n- Update the version number in `package.json` and `package-lock.json`\n- Run any [npm version scripts](https://docs.npmjs.com/cli/version.html) (`preversion`, `version`, or `postversion`)\n- It will **NOT** commit, tag, or push to git.\n\n\n\n### Git Commit\nYou can use the `--commit` argument by itself to prompt the user for the version number. If you don't specify a commit message, then it defaults to \"**release vX.X.X**\". If you _do_ specify a commit message, then the version number will be appended to it.  Or you can insert `%s` placeholders in the message, and they'll be replaced with the version number instead.\n\n```\nbump --commit\nbump --commit \"This is release v\"\nbump --commit \"The v%s release\"\n```\n\nYou can also specify a release type instead of prompting the user:\n\n```\nbump major --commit\nbump minor --commit \"This is release v\"\nbump patch --commit \"The v%s release\"\n```\n\nThe above commands do the following:\n\n- Update the version number in `package.json` and `package-lock.json`\n- Run any [npm version scripts](https://docs.npmjs.com/cli/version.html) (`preversion`, `version`, or `postversion`)\n- Commit the `package.json` and `package-lock.json` files to git\n- The commit will **NOT** be tagged\n- The commit will **NOT** be pushed to the remote\n\n\n### Git Tag\nThe `--commit` argument does not tag the commit by default. You can use the `--tag` argument to do that.  You can optionally specify a tag name, which can contain `%s` placeholders, just like the commit message.\n\nYou don't need to specify the `--commit` argument, since it's implied by `--tag`.  Unless you want to customize the commit message.\n\n```\nbump --tag\nbump major --tag \"v%s tag\"\nbump patch --commit \"release v\" --tag \"v\"\n```\n\nThe above commands do the following:\n\n- Update the version number in `package.json` and `package-lock.json`\n- Run any [npm version scripts](https://docs.npmjs.com/cli/version.html) (`preversion`, `version`, or `postversion`)\n- Commit the `package.json` and `package-lock.json` files to git\n- Tag the commit\n- The commit will **NOT** be pushed to the remote\n\n\n### Git Push\nThe `--push` argument pushes the git commit and tags.\n\n```\nbump --commit --push\nbump major --tag --push\nbump patch --tag \"v%s tag\" --push\nbump prerelease --commit \"release v\" --tag \"v\" --push\n```\n\n\n### Specifying Files to Update\nAll of the `bump` commands shown above operate on the `package.json` and `package-lock.json` files by default. You can specify a custom list of files and/or [glob patterns](https://www.npmjs.com/package/glob#glob-primer) to update instead.\n\n\u003e **Note:** If you specify your own file list, then the `package.json` and `package-lock.json` files will **not** be updated by default. You need to explicitly include them in your file list if you want them updated.\n\n```\nbump README.md\nbump package.json package-lock.json README.md\nbump *.json *.md\n```\n\n\n\nVersion Scripts\n--------------------------\n`version-bump-prompt` will execute your `preversion`, `version`, and `postversion` scripts, just like [the `npm version` command](https://docs.npmjs.com/cli/version) does. If your `package.json` file contains any or all of these scripts, then they will be executed in the following order:\n\n  - The `preversion` script runs before the version is updated (and before the version prompt is shown)\n  - The `version` script runs after the version is updated, but _before_ `git commit` and `git tag`\n  - The `postversion` script runs after `git commit` and `git tag`, but _before_ `git push`\n\n\n\nContributing\n--------------------------\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/JS-DevTools/version-bump-prompt/issues) on GitHub and [submit a pull request](https://github.com/JS-DevTools/version-bump-prompt/pulls).\n\n#### Building\nTo build the project locally on your computer:\n\n1. __Clone this repo__\u003cbr\u003e\n`git clone https://github.com/JS-DevTools/version-bump-prompt.git`\n\n2. __Install dependencies__\u003cbr\u003e\n`npm install`\n\n3. __Build the code__\u003cbr\u003e\n`npm run build`\n\n4. __Run the tests__\u003cbr\u003e\n`npm test`\n\n\n\nLicense\n--------------------------\nVersion Bump Prompt is 100% free and open-source, under the [MIT license](LICENSE). Use it however you want.\n\nThis package is [Treeware](http://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/JS-DevTools/version-bump-prompt) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.\n\n\n\nBig Thanks To\n--------------------------\nThanks to these awesome companies for their support of Open Source developers ❤\n\n[![GitHub](https://jstools.dev/img/badges/github.svg)](https://github.com/open-source)\n[![NPM](https://jstools.dev/img/badges/npm.svg)](https://www.npmjs.com/)\n[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n[![Travis CI](https://jstools.dev/img/badges/travis-ci.svg)](https://travis-ci.com)\n[![SauceLabs](https://jstools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)\n","funding_links":[],"categories":["cli"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJS-DevTools%2Fversion-bump-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJS-DevTools%2Fversion-bump-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJS-DevTools%2Fversion-bump-prompt/lists"}