PHPackages                             phug/split - 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. [Templating &amp; Views](/categories/templating)
4. /
5. phug/split

ActiveLibrary[Templating &amp; Views](/categories/templating)

phug/split
==========

Pug (ex-Jade) facade engine for PHP, HTML template engine structured by indentation

1.5.1(3mo ago)03.9kMITPHPPHP ^7.3 || ^8.0CI failing

Since Sep 15Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/phug-php/split)[ Packagist](https://packagist.org/packages/phug/split)[ Docs](https://phug-lang.com)[ GitHub Sponsors](https://github.com/kylekatarnls)[ Fund](https://opencollective.com/pug-php)[ RSS](/packages/phug-split/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (9)Dependencies (9)Versions (12)Used By (0)

Phug Split
==========

[](#phug-split)

[![Latest Stable Version](https://camo.githubusercontent.com/d22544a7457a166eb9d08a8e11a14fbfe56f20a5b1052bd6b03db4f6da34f3ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706875672f73706c69742e737667)](https://packagist.org/packages/phug/split)[![Tests](https://github.com/phug-php/split/actions/workflows/tests.yml/badge.svg)](https://github.com/phug-php/split/actions/workflows/tests.yml)

**Split** is a tool to handle a mono-repo that can be downloaded as single package, multiple packages or both.

Install
-------

[](#install)

```
composer require phug/split
```

Usage
-----

[](#usage)

Put **composer.json** files in sub-directory of a main package repository.

```
vendor/bin/split update
```

Check options with:

```
vendor/bin/split update --help
```

Check other commands with:

```
vendor/bin/split --help
```

Passing GIT authentication via environment variables:

Export env var such as:

```
REPOSITORY_CREDENTIALS=my-git-username:my-authentication-token
```

```
vendor/bin/split update --git-credentials=$REPOSITORY_CREDENTIALS
```

Example
-------

[](#example)

[phug-php/phug](https://github.com/phug-php/phug) is a library that can be required either entirely with `phug/phug` or as separated packages `phug/parser`, `phug/compiler`, etc.

Each package is defined by a directory in [src/Phug](https://github.com/phug-php/phug/tree/master/src/Phug) with a dedicated `composer.json`file inside each of them.

Once you created a GitHuba (or other git publisher) repository, and registered each of them on [packagist.org](https://packagist.org/)(you can submit repository with just a single composer.json file with basic infos, the split will insert the actual content later).

You can now simply run from the monorepository the `vendor/bin/split update` or run this automatically from a hook or a job.

For instance `phug/phug` uses GitHub Actions to trigger it automatically after each commit: [.github/workflows/split.yml](https://github.com/phug-php/phug/blob/master/.github/workflows/split.yml)

It relies on very few steps:

- Load PHP via `shivammathur/setup-php@v2`
- Cache dependencies folder with `actions/cache@v4` to make the job faster (optional)
- Install `phug/split` with:

    ```
    test -f composer.json && mv composer.json composer.json.save -f
    composer require phug/split --no-interaction
    test -f composer.json.save && mv composer.json.save composer.json -f
    ```

    (`mv` commands are optional, it's here to install only `phug/split` as your other dependencies are not needed for this job)
- Run the `split update` command

    ```
    - name: Split monorepository
      run: vendor/bin/split update --git-credentials=$REPOSITORY_CREDENTIALS
      env:
        REPOSITORY_CREDENTIALS: ${{ secrets.REPOSITORY_CREDENTIALS }}
    ```

    Here we pass git credentials using the `git-credentials` as the job runner will not have an authenticaed git user able to push to your repositories.

    The authentication variable is you git username, followed by `:`, followed by an authentication token you can generate via the page (See documentation: [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)).

    Don't put this clear token directly in the GitHub Action file, use a repository secret (See documentation: [Encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets)) to keep it private.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance81

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 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

Every ~296 days

Recently: every ~591 days

Total

9

Last Release

102d ago

### Community

Maintainers

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

---

Top Contributors

[![kylekatarnls](https://avatars.githubusercontent.com/u/5966783?v=4)](https://github.com/kylekatarnls "kylekatarnls (56 commits)")

---

Tags

splitmonorepophugmultipackages

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phug-split/health.svg)

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

###  Alternatives

[phug/phug

Pug (ex-Jade) facade engine for PHP, HTML template engine structured by indentation

66297.7k14](/packages/phug-phug)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

291.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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