PHPackages                             biurad/monorepo - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. biurad/monorepo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

biurad/monorepo
===============

Library for working with Git repositories and PHP as a monorepo

16PHP

Since Feb 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/biurad/php-monorepo)[ Packagist](https://packagist.org/packages/biurad/monorepo)[ RSS](/packages/biurad-monorepo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

The Poakium Monorepo
====================

[](#the-poakium-monorepo)

[![Latest Version](https://camo.githubusercontent.com/7fcf52fb4865c430fe5c63278b3a208d182d9780b5efa47ea1ec8d4cfa1fefff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6269757261642f6d6f6e6f7265706f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/biurad/monorepo)[![Software License](https://camo.githubusercontent.com/d8c1f1b4c1b899449e9539d4de1ca66abde4c190f41ce41e7abc3330da5cad2e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253442d2d332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Code Maintainability](https://camo.githubusercontent.com/f852ac4f8b2c78db19a7b4bc40589c815fc6dacd36f82f433b83f8c8789d088f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f6269757261642f7068702d6d6f6e6f7265706f3f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/biurad/php-monorepo)[![Coverage Status](https://camo.githubusercontent.com/280028035537704269628b68341c1daa4e4d2a15f67852d7fc73fd6340fbc37c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6269757261642f7068702d6d6f6e6f7265706f3f7374796c653d666c61742d737175617265)](https://codecov.io/gh/biurad/php-monorepo)[![Quality Score](https://camo.githubusercontent.com/412942f275fb16bd0e5e2e2d8807572aa5ef0a98a7afec2dcad7982efb7bbf2d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6269757261642f7068702d6d6f6e6f7265706f2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/biurad/php-monorepo)

---

A PHP library for working with Monorepo Project's. This library handles splitting of sub folder commits and pushing of tags into multiple remote repositories which depends on a `.monorepo` config file in your monorepo's working directory.

📦 Installation
--------------

[](#-installation)

PHP 8.0 or newer and [GIT](https://git-scm.com) 2.30 or newer are required. The recommended way to install, is by using [Composer](https://getcomposer.org). Simply run:

```
$ composer require biurad/monorepo
```

📍 Quick Start
-------------

[](#-quick-start)

This library main purpose is for continuously splitting up a monorepo project into multiple repositories as read-only. Handles splitting of branches and tags, this library is truly extendable as you can define different worker classes for a particular job run. [splitsh/lite](https://githib.com/splitsh/lite) is used under the hood for great performance.

> NB: It is highly recommended to have git filter-repo installed as this allows re-merging of multiple repositories as many times as you want, the default way merges once an can be very risky to re-merge.

In order to use this library, a `.monorepo` yaml syntax config file must exists in project working directory. Here is an example of the *.monorepo* config:

```
# URL or absolute path to the remote GIT repository of the monorepo
base_url: https://github.com/YOUR-VENDORNAME/YOUR-PROJECT.git

# All branches that match this regular expression will be split by default
branch_filter: /^(main|develop|\d+\.\d+)$/

# A list of workers which should run when the monorepo command is called
workers:
  main:
    - Biurad\Monorepo\Worker\SplitCommitsWorker
  #  - Custom\MonorepoWorker
  merge:
    - Biurad\Monorepo\Worker\MergeRepoWorker
  #release:
  #  - Biurad\Monorepo\Worker\PushNextDevWorker

# List of all split projects
repositories:
  # The first split project living in the folder /first-subfolder
  first-subfolder:
    # URL or absolute path to the remote GIT repository
    url: https://github.com/YOUR-VENDORNAME/YOUR-FIRST-SPLIT-PROJECT.git
  # Second split project living in the folder /second-subfolder
  second-subfolder:
    # URL or absolute path to the remote GIT repository
    url: https://github.com/YOUR-VENDORNAME/YOUR-SECOND-SPLIT-PROJECT.git
    # A path which exist in the root path where monorepo command is called
    # If not defined, this config key (second-subfolder) is used as path
    path: php-example
    # If true, Repo supports merging & splitting. If false, only splitting is supported
    merge: true

# An array of configuration's which custom workers may rely on
extra: ~
```

This library uses a single workflow command that takes in one argument which is the specified job name (default is *main*) and a bunch of options required by class workers. You can also use this library in your CI workflow, if you seek to have all commits and tags created while running this library in GitHub Actions CI signed. Then checkout [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) repository to enable such feature.

To use run this library simply run this command in your terminal:

```
$ php vendor/bin/monorepo
```

📓 Documentation
---------------

[](#-documentation)

In-depth documentation on how to use this library can be found at [docs.biurad.com](https://docs.biurad.com/php/monorepo). It is also recommended to browse through unit tests in the [tests](./tests/) directory.

🙌 Sponsors
----------

[](#-sponsors)

If this library made it into your project, or you interested in supporting us, please consider [donating](https://biurad.com/sponsor) to support future development.

👥 Credits &amp; Acknowledgements
--------------------------------

[](#-credits--acknowledgements)

- [Martin Auswöger](https://au.si/) developed the [contao/monorepo-tools](https://github.com/contao/monorepo-tools) library which inspired this library.
- [Divine Niiquaye Ibok](https://github.com/divineniiquaye) is the author this library.
- [All Contributors](https://github.com/biurad/php-monorepo/contributors) who contributed to this project.

📄 License
---------

[](#-license)

Poakium Monorepo is completely free and released under the [BSD 3 License](LICENSE).

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a71bed376af70d8c5eeb12c80cfb4bf428f70e48301fb2bba1d4a87009e20eeb?d=identicon)[divineniiquaye](/maintainers/divineniiquaye)

---

Top Contributors

[![divineniiquaye](https://avatars.githubusercontent.com/u/53147395?v=4)](https://github.com/divineniiquaye "divineniiquaye (26 commits)")

### Embed Badge

![Health badge](/badges/biurad-monorepo/health.svg)

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

PHPackages © 2026

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