PHPackages                             schranz/mono - 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. schranz/mono

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

schranz/mono
============

A binary to run commands in a monorepo

2.2.2(3mo ago)142.3k1[2 issues](https://github.com/alexander-schranz/mono/issues)MITPHPPHP ^8.1

Since Jun 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/alexander-schranz/mono)[ Packagist](https://packagist.org/packages/schranz/mono)[ RSS](/packages/schranz-mono/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)DependenciesVersions (10)Used By (0)

Mono helps to manage your PHP Mono Repositories
===============================================

[](#mono-helps-to-manage-your-php-mono-repositories)

Managing a monorepository?

Mono helps you to initialize subtree split and run composer and other commands for all your package directories.

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

[](#installation)

```
composer require schranz/mono --dev
```

Usage
-----

[](#usage)

Init Split Command
------------------

[](#init-split-command)

First create your mono repository and push it to Github.

Create your packages into different directories make sure for to create for all packages you want to split a `composer.json` with a `name` in it.

Then run:

```
vendor/bin/mono init-split
```

It will create the configuration for [frankdejonge/use-subsplit-publish](https://github.com/frankdejonge/use-subsplit-publish)Github Action. Make sure to configure your `PERSONAL_ACCESS_TOKEN` as a secret in your Github repository. And configure the user in the newly created `.github/workflows/publish-subsplits.yml` file.

Run Command
-----------

[](#run-command)

To install the dependencies of all your mono repositories, just run:

```
vendor/bin/mono run composer install
```

To update them run:

```
vendor/bin/mono run composer update
```

To run a custom custom composer script use:

```
vendor/bin/mono run composer fix # runs in my case rector + php-cs-fixer

vendor/bin/mono run composer lint # runs in my case various linters (phpstan, php-cs, ...)
```

Mono is used and was build for managing [schranz-search monorepository](https://github.com/php-cmsig/search).

Upgrade dependency
------------------

[](#upgrade-dependency)

If you have one dependency used in multiple packages and want to upgrade it in all packages you can use:

```
vendor/bin/mono upgrade-dependency phpstan/phpstan
```

Mono search for all packages which has then `phpstan/phpstan` in it and update it to the latest stable version.

Rename branch
-------------

[](#rename-branch)

If you want to rename a branch on all your packages in your mono repository you can use the following command:

```
PERSONAL_ACCESS_TOKEN= vendor/bin/mono rename-branch 0.3 0.4
```

Mono search for all your packages and uses the Github API to rename a specific given branch to the new name.

> You require at least a `PERSONAL_ACCESS_TOKEN` with `contents:write` or `admins:write` (default branch) scope.

Projects using mono
-------------------

[](#projects-using-mono)

- [schranz-search](https://github.com/php-cmsig/search)
- [modelflow-ai](https://github.com/modelflow-ai/.github)

Let me know via [an issue](https://github.com/alexander-schranz/mono) if you are using mono.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance76

Regular maintenance activity

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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

Every ~135 days

Recently: every ~205 days

Total

8

Last Release

111d ago

Major Versions

1.0.1 → 2.0.02023-08-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1698337?v=4)[Alexander Schranz](/maintainers/alexander-schranz)[@alexander-schranz](https://github.com/alexander-schranz)

---

Top Contributors

[![alexander-schranz](https://avatars.githubusercontent.com/u/1698337?v=4)](https://github.com/alexander-schranz "alexander-schranz (13 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (2 commits)")

---

Tags

monorepomonorepositoryphpmonorepomonomonorepository

### Embed Badge

![Health badge](/badges/schranz-mono/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.1k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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