npm version from-git

Category: Node.js & npm/yarn

npm version from-git

Bump the version from the latest git tag

Reads the most recent git tag, treats it as the package version, and writes it into package.json. Keeps the manifest in sync when tags are the source of truth for releases. Requires the tag to look like a version, such as v2.1.0.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.