PHPackages                             rhapsodic/pbump - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. rhapsodic/pbump

ActiveLibrary[CLI &amp; Console](/categories/cli)

rhapsodic/pbump
===============

CLI tool for semantic release versioning and git tagging

v1.0.0(1mo ago)029—3.4%MITPHPPHP ^8.2CI passing

Since May 5Pushed 1mo agoCompare

[ Source](https://github.com/rhapsodic-dev/pbump)[ Packagist](https://packagist.org/packages/rhapsodic/pbump)[ Docs](https://github.com/rhapsodic-dev/pbump)[ RSS](/packages/rhapsodic-pbump/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

pbump
=====

[](#pbump)

`pbump` is a CLI tool for semver releases in PHP projects with automatic release commit creation and git tagging.

Features
--------

[](#features)

- bump the version manually (`patch`, `minor`, `major`, `as-is`) or by conventional commits (`next`);
- read the current version from `composer.json` or the latest git tag;
- update `composer.json` when the version source is set to `composer`;
- run in `dry-run` mode without making changes;
- optionally release with unrelated uncommitted files while committing only `composer.json`;
- work interactively through a menu or non-interactively in CI.

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Git

Installation
------------

[](#installation)

```
composer require --dev rhapsodic/pbump
```

After installation, the binary will be available as `vendor/bin/pbump`.

Quick Start
-----------

[](#quick-start)

Preview what will happen:

```
php vendor/bin/pbump --dry-run --type=next
```

Create a patch release without interactive confirmation:

```
php vendor/bin/pbump --type=patch --yes
```

Show the current version:

```
php vendor/bin/pbump --version
```

Show help:

```
php vendor/bin/pbump --help
```

How a Release Works
-------------------

[](#how-a-release-works)

During a normal `pbump` run:

1. it determines the current version;
2. it calculates the target version;
3. it updates `composer.json` when needed;
4. it creates a `chore: release vX.Y.Z` commit;
5. it creates a git tag;
6. it pushes the current branch and tag.

By default, the tag is named `vX.Y.Z`, but you can disable tagging or provide a custom tag name.

By default, `pbump` requires a clean working tree. If you need to release while unrelated files are modified, use `--allow-dirty` or set `"allowDirty": true`; in that mode `pbump` updates `composer.json`, commits only `composer.json`, and leaves the other files untouched.

Release Types
-------------

[](#release-types)

- `patch` - `X.Y.Z -> X.Y.(Z+1)`
- `minor` - `X.Y.Z -> X.(Y+1).0`
- `major` - `X.Y.Z -> (X+1).0.0`
- `as-is` - keep the current version
- `next` - calculate the bump from conventional commits
- `conventional` - alias for `next`

Version Source
--------------

[](#version-source)

The `--version-source` flag supports three modes:

- `auto` - use `composer.json.version` first, and fall back to the latest git tag if it is missing;
- `composer` - always read the version from `composer.json.version` and update it during release;
- `tag` - always read the version from the latest git tag; `composer.json` is not modified.

If there are no tags yet and the source is `tag`, the current version is treated as `0.0.0`.

The latest tag must contain a semver version at the end of the name, for example `v1.2.3` or `release-1.2.3`.

Configuration via `.pbump.config.json`
--------------------------------------

[](#configuration-via-pbumpconfigjson)

You can create a `.pbump.config.json` file in the project root with default values:

```
{
  "type": "next",
  "versionSource": "auto",
  "tag": true,
  "push": true,
  "yes": false,
  "quiet": false,
  "allowDirty": false
}
```

Supported keys:

- `type`
- `dryRun`
- `tag`
- `push`
- `yes`
- `quiet`
- `versionSource`
- `allowDirty`

CLI arguments take precedence over `.pbump.config.json`.

`tag` can be:

- `true` - create the standard `vX.Y.Z` tag;
- `false` - do not create a tag;
- a string - create a tag with the provided name.

Main Options
------------

[](#main-options)

- `-h`, `--help` - show help
- `-v`, `--version` - print the current version
- `--dry-run` - show the plan without making changes
- `--type=` - explicitly set the release type
- `--version-source=` - choose the version source: `auto`, `composer`, `tag`
- `-t`, `--tag[=]` - create a tag, optionally with a custom name
- `--no-tag` - do not create a tag
- `-p`, `--push` - push using the current git upstream
- `--no-push` - do not push
- `-y`, `--yes` - skip confirmation
- `-q`, `--quiet` - hide the summary
- `--allow-dirty` - allow unrelated uncommitted files and commit only `composer.json`

Interactive and CI Behavior
---------------------------

[](#interactive-and-ci-behavior)

If `--type` is not provided and input is interactive, `pbump` will show a release type selection menu.

For non-interactive runs, it is best to always pass:

```
php vendor/bin/pbump --type=next --yes
```

Otherwise, the tool will not be able to ask for confirmation before creating a release.

Development and Tests
---------------------

[](#development-and-tests)

Run linter:

```
composer lint
```

Run static analysis:

```
composer analyse
```

Run tests:

```
composer test
```

Format code:

```
composer format
```

Run the entrypoint locally without a Composer bin proxy:

```
php scripts/release.php --help
```

License
-------

[](#license)

[MIT License](./LICENSE)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance93

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

35d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74ab9515daa8063c8fdf0b9f52ad9cb147d350e2ede972e5d4cea18ec1e467da?d=identicon)[rhapsodic](/maintainers/rhapsodic)

---

Top Contributors

[![TrenLok](https://avatars.githubusercontent.com/u/29494793?v=4)](https://github.com/TrenLok "TrenLok (2 commits)")

---

Tags

composerreleasesemvergit

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rhapsodic-pbump/health.svg)

```
[![Health](https://phpackages.com/badges/rhapsodic-pbump/health.svg)](https://phpackages.com/packages/rhapsodic-pbump)
```

###  Alternatives

[brainmaestro/composer-git-hooks

Easily manage git hooks in your composer config

1.1k9.4M492](/packages/brainmaestro-composer-git-hooks)[stolt/lean-package-validator

Library and CLI for validating if a project or package has and will have lean releases.

186.1k29](/packages/stolt-lean-package-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
