| Crates.io | grubble |
| lib.rs | grubble |
| version | 4.8.0 |
| created_at | 2025-12-14 11:41:50.884059+00 |
| updated_at | 2025-12-25 22:29:44.638251+00 |
| description | Automatic semantic versioning based on conventional commits, optimized for AI-generated commit messages |
| homepage | https://github.com/davegarvey/grubble |
| repository | https://github.com/davegarvey/grubble |
| max_upload_size | |
| id | 1984338 |
| size | 127,950 |
Automatic semantic versioning based on conventional commits, optimised for AI-generated commit messages.
Download from GitHub Releases:
# Linux x86_64
curl -L https://github.com/davegarvey/grubble/releases/download/v4.0.0/grubble-linux-x86_64.tar.gz | tar xz
sudo mv grubble /usr/local/bin/
# macOS Intel
curl -L https://github.com/davegarvey/grubble/releases/download/v4.0.0/grubble-macos-x86_64.tar.gz | tar xz
sudo mv grubble /usr/local/bin/
# macOS Apple Silicon
curl -L https://github.com/davegarvey/grubble/releases/download/v4.0.0/grubble-macos-aarch64.tar.gz | tar xz
sudo mv grubble /usr/local/bin/
# Windows
curl -L https://github.com/davegarvey/grubble/releases/download/v4.0.0/grubble-windows-x86_64.zip -o grubble.zip
unzip grubble.zip
# Add grubble.exe to PATH
cargo install grubble
uses: davegarvey/grubble@v4
git clone https://github.com/davegarvey/grubble.git
cd grubble
cargo build --release
# Binary available at target/release/grubble
# Run in your project root
grubble
# Push to remote
grubble --push
# Create git tag
grubble --tag
# Raw mode (output only version, dry run)
grubble --raw
# Suppress commit list output
grubble --quiet
# Generate and maintain CHANGELOG.md
grubble --changelog
# With explicit options overrides
grubble --tag --tag-prefix "release-v"
grubble --commit-prefix "chore(release): bump"
grubble --preset git --tag
grubble --release-notes --tag
grubble --package-files "Cargo.toml,client/Cargo.toml"
grubble --git-user-name "My Name" --git-user-email "my@email.com"
# Update major version tag (e.g., v4 -> v4.x.x)
grubble --tag --update-major-tag
# Update both major and minor version tags
grubble --tag --update-major-tag --update-minor-tag --push
# Show help
grubble --help
Grubble can be configured using CLI arguments or a .versionrc.json file.
All options can be passed as command-line arguments:
grubble \
--package-files Cargo.toml \
--commit-prefix "chore: bump version" \
--tag-prefix v \
--preset rust \
--push \
--tag \
--changelog \
--release-notes
Alternatively, create .versionrc.json in your project root:
{
"packageFiles": ["Cargo.toml", "client/Cargo.toml"],
"commitPrefix": "chore: bump version",
"tagPrefix": "v",
"push": false,
"tag": false,
"changelog": true,
"preset": "rust",
"types": {
"config": "patch"
}
}
packageFiles: Array of package files to update (default: [])commitPrefix: Prefix for version bump commits (default: "chore: bump version")tagPrefix: Prefix for git tags (default: "v")push: Whether to push commits/tags to remote (default: false)tag: Whether to create git tags for versions (default: false)changelog: Generate and maintain a CHANGELOG.md file following "Keep a Changelog" format (default: false)updateMajorTag: Update major version tag (e.g., v4 pointing to latest v4.x.x) (default: false)updateMinorTag: Update minor version tag (e.g., v4.1 pointing to latest v4.1.x) (default: false)gitUserName: Git user name for commits (default: "grubble-bot")gitUserEmail: Git user email for commits (default: "grubble-bot@noreply.local")
preset: Versioning strategy to use (default: "git"). Options:
"rust": Updates Cargo.toml version field"git": Tracks version via git tags only (no file updates)"node": Updates package.json version fieldtypes: Object mapping commit types to version bump behavior (default: see Commit Types section). Valid values: "major", "minor", "patch", "none"
{"config": "patch", "revert": "none"}Grubble supports different versioning strategies depending on your project type:
preset: "rust")Best for: Rust applications and libraries
What it does:
version field in Cargo.tomlCargo.lock if present (recommended for binary crates)Example usage:
grubble --preset rust --push --tag
When to use: For Rust projects. Automatically updates your Cargo.toml and works seamlessly with cargo publish.
preset: "node")Best for: JavaScript/TypeScript applications and packages
What it does:
version field in package.jsonpackage-lock.json if presentExample usage:
grubble --preset node --push --tag
When to use: For Node.js projects. Automatically updates your package.json and works seamlessly with npm/yarn publishing.
preset: "git")Best for: Projects that don't need file-based versioning
What it does:
Example usage:
grubble --preset git --push --tag
When to use: Default choice for projects that don't need file-based versioning. Useful for monorepos or projects with custom versioning schemes.
The strategy system is designed to be extensible. You can implement custom strategies for other languages or build systems by:
Strategy traitsrc/strategy.rs"preset": "your-custom-strategy"This allows grubble to work with Python projects, Go modules, Docker-based versioning, or any other versioning scheme your project requires.
When switching from the git strategy (tag-only) to file-based strategies like node or rust, or if package files are outdated compared to existing tags, Grubble automatically syncs the package versions:
This ensures version consistency across strategies and prevents conflicts when creating new tags.
Best for: Maintainers of GitHub Actions, reusable workflows, or libraries where users reference by major version
When enabled, Grubble maintains "floating" major (and optionally minor) version tags that always point to the latest release in that version range:
v4) → always points to latest v4.x.x releasev4.1) → always points to latest v4.1.x releaseThis follows GitHub Actions best practices where users can reference uses: owner/repo@v4 to automatically get the latest v4 release without manually updating to each new patch version.
CLI:
# Update major version tag only
grubble --tag --push --update-major-tag
# Update both major and minor version tags
grubble --tag --push --update-major-tag --update-minor-tag
GitHub Action:
- uses: davegarvey/grubble@v4
with:
tag: true
push: true
update-major-tag: true
Note: Grubble itself uses major version tag tracking in its release workflow, so you can reference uses: davegarvey/grubble@v4 to automatically get the latest v4.x.x release.
Configuration file (.versionrc.json):
{
"tag": true,
"push": true,
"updateMajorTag": true,
"updateMinorTag": false
}
v4.2.3)v4) pointing to the same commitv4.2) pointing to the same commit✅ Use major version tracking when:
⚠️ Consider the implications:
Best for: Projects that want automated, standardized changelogs
When enabled, Grubble automatically generates and maintains a CHANGELOG.md file following the Keep a Changelog format:
CLI:
# Enable changelog generation
grubble --changelog --tag --push
# Combine with other options
grubble --changelog --preset rust --tag
GitHub Action:
- uses: davegarvey/grubble@v4
with:
changelog: true
tag: true
push: true
Configuration file (.versionrc.json):
{
"changelog": true,
"tag": true,
"push": true
}
Commits are automatically categorized based on their conventional commit type:
feat: → Added sectionfix: → Fixed sectionperf:, refactor: → Changed sectionrevert: → Removed sectionsecurity: → Security section! or BREAKING CHANGE) → Changed section with BREAKING: prefix## [1.2.0] - 2025-12-16
### Added
- Add user authentication system
- Add support for custom themes
### Fixed
- Fix memory leak in cache handler
- Fix incorrect date formatting
### Changed
- **BREAKING:** Refactor API endpoints to use REST conventions
✅ Use changelog generation when:
⚠️ Consider:
packageFiles array for multiple packagesRun once to enable the shared hooks path:
git config core.hooksPath scripts/hooks
The pre-commit hook runs cargo fmt --all (fixes formatting) and cargo clippy --all-targets --all-features -- -D warnings so commits fail early if code would break CI checks. You can temporarily skip steps with SKIP_FMT=1 or SKIP_CLIPPY=1, and opt into running tests with RUN_TESTS=1.
name: Release
on:
pull_request:
types: [closed]
branches: [main]
jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: davegarvey/grubble@v4
with:
push: true
tag: true
update-major-tag: true # Maintain v4 pointing to latest v4.x.x
If you prefer more control over the process:
name: Release
on:
pull_request:
types: [closed]
branches: [main]
jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write # Required for pushing commits/tags
pull-requests: read # Required for PR info
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for commit analysis
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Run tests
run: cargo test
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Install grubble
run: cargo install grubble
- name: Bump version and release
run: |
grubble \
--push \
--tag \
--git-user-name "github-actions[bot]" \
--git-user-email "41898282+github-actions[bot]@users.noreply.github.com"
contents: write permission for automated commits/tagscargo test and cargo clippy before releasingfetch-depth: 0 for complete commit history analysisfeat: → minor bumpfix: → patch bump! or BREAKING CHANGE → major bumpdocs:, test:, chore:, ci:, build:, style:, refactor:, perf: → no bumpNote: These are the default mappings. You can customize version bump behavior for any commit type using the types configuration in .versionrc.json.
"Author identity unknown"
"grubble: command not found"
cargo install grubbleNo version bump on merge
feat:, fix:, etc.fetch-depth: 0 in checkout actionInvalid config file
.versionrc.json contains valid JSONPackage file not found
--package-files to specify correct file paths for your project typeversion fieldgrubble for debugging (pushing is disabled by default)cargo test to verify your project setupThis tool is optimised for AI-generated commit messages that follow conventional commit format. See .github/prompts/sc.prompt.md for an example prompt that generates commits compatible with grubble.