Bump the project version using semver. Accepts one argument: major, minor, or patch.
Semver rules
Given a version MAJOR.MINOR.PATCH:
patch→ increment PATCH, e.g. 0.4.6 → 0.4.7minor→ increment MINOR, reset PATCH, e.g. 0.4.6 → 0.5.0major→ increment MAJOR, reset MINOR and PATCH, e.g. 0.4.6 → 1.0.0
Files to update
All three files must be updated to the new version:
package.json— top-level"version"field.claude-plugin/plugin.json— top-level"version"field.claude-plugin/marketplace.json—"version"insideplugins[0]CHANGELOG.md— new version section inserted at the top
Steps
If no argument is provided, ask the user which bump type they want (major, minor, or patch).
Read
package.jsonto get the current version.Compute the new version according to the semver rules above.
Tell the user: "Bumping version from X.Y.Z to A.B.C"
Update all three manifest files using the Edit tool.
Run
git log --format='%s%n%n%b' <last-bump-hash>..HEADwhere<last-bump-hash>is the most recent commit matchingchore: bump version to(find it withgit log --oneline --grep='chore: bump version to' -1). Use the commit subjects and body descriptions as context to write a concise bullet-point list of significant changes for the new version entry.Read
CHANGELOG.mdand insert a new version section immediately after the# Changelogheading (before the first existing##entry) using the Edit tool:## A.B.C - Summary of change 1 - Summary of change 2Report the updated version.
Stage the changed files and commit with the message:
chore: bump version to A.B.C