PHPackages                             shel/yaml-splitter - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. shel/yaml-splitter

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

shel/yaml-splitter
==================

Splits YAML files

1.0.1(4y ago)11820↓50%1MITPHPPHP &gt;=7.3

Since Jun 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Sebobo/YamlSplitter)[ Packagist](https://packagist.org/packages/shel/yaml-splitter)[ Docs](https://www.helzle.it)[ GitHub Sponsors](https://github.com/sebobo)[ Patreon](https://www.patreon.com/shelzle)[ RSS](/packages/shel-yaml-splitter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Neos CMS node type YAML file splitter and reorganizer
=====================================================

[](#neos-cms-node-type-yaml-file-splitter-and-reorganizer)

Features:

- split YAML files containing multiple nodetypes into separate files each containing one nodetype
- reorganize nodetypes files from the old style `Configuration` folder to the new `NodeTypes` folder and will also create subfolders based on their naming scheme

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

[](#installation)

### Recommended

[](#recommended)

Download the Phar version of the [latest release](https://github.com/Sebobo/YamlSplitter/releases). You can find it after the individual change log in the `Assets` section.

Afterwards you should make the file executable by running

```
chmod a+x yaml-splitter.phar
```

Now you can follow the usage examples below.

### Via composer

[](#via-composer)

Add this tool as dependency to your project via

```
composer require --dev shel/yaml-splitter
```

Or install the package [globally](https://getcomposer.org/doc/03-cli.md#global) via

```
composer global require shel/yaml-splitter
```

Afterwards you can run the commands in your project by prefixing the usage examples like this:

```
bin/yaml-splitter.php split ...
```

Usage
-----

[](#usage)

### List commands

[](#list-commands)

```
./yaml-splitter.phar list

```

### Show options for split command

[](#show-options-for-split-command)

```
./yaml-splitter.phar help split

```

### Split a file

[](#split-a-file)

```
./yaml-splitter.phar split [options] [--]  []

```

This will copy each node type found in the input file into a new file. Each new file be have a name like `NodeTypes.MyNodeType.yaml`.

Additionally, each filename will get a prefix after `NodeTypes` like `Document`, `Content` or `Mixin`based on the name of the actual node type.

Also, when the option `package-key` is provided, node types matching the package key will have the standard naming and others will get names like `NodeTypes.Override.SomeOtherNodeType.yaml`.

#### Options

[](#options)

- `dry-run` allows seeing what would happen without writing any file
- `use-folders` splits the nodetypes into a folder structure for Neos 7.2+
- `package-key` allows to define the main package key of your node types, so node types with different package keys would be written to `NodeTypes.Override.xyz` files.
- `indentation` number of spaces for indentation in the resulting YAML files

#### Example

[](#example)

```
./yaml-splitter.phar split --dry-run --package-key MyVendor path/to/MyVendor.NodeTypes.yaml path/to/package
```

### Reorganize the nodetypes in a Configuration folder into Neos 7.2+ nodetype subfolders

[](#reorganize-the-nodetypes-in-a-configuration-folder-into-neos-72-nodetype-subfolders)

With Neos 7.2 it's possible to organize nodetypes into separate folders than `Configuration`. It also allows you to use subfolders.

With the following command you can move all `NodeTypes.*.yaml` from a `Configuration` folder into another folder. They will automatically be put into subfolders based on their naming scheme.

So for example you have the following files in your `Configuration` folder of your site package:

```
Configuration
├── NodeTypes.Content.Image.yaml
├── NodeTypes.Content.Text.yaml
├── NodeTypes.Document.Abstract.Page.yaml
├── NodeTypes.Document.Home.yaml
├── NodeTypes.Document.Page.yaml
├── NodeTypes.Override.Content.Popup.yaml
├── NodeTypes.Override.Mixin.Document.yaml
└── NodeTypes.Override.Mixin.MarginMixin.yaml
```

Now you run the `reorganize` command:

```
./yaml-splitter.phar reorganize path/to/sitepackage/Configuration path/to/sitepackage/NodeTypes
```

After you execute the command you will have the following structure:

```
NodeTypes
├── Content
│   ├── Image.yaml
│   └── Text.yaml
├── Document
│  ├── Abstract
│  │   └── Page.yaml
│  ├── Home.yaml
│  └── Page.yaml
└── Override
    ├── Content
    │   └── Popup.yaml
    └── Mixin
        ├── Document.yaml
        └── MarginMixin.yaml
```

**Note:** If you still have multiple nodetypes inside one file, it's recommended to first run the `split` command and then `reorganize`.

Contributing
------------

[](#contributing)

The tool is based on the Symfony console component.

### Building the phar

[](#building-the-phar)

First [install box](https://github.com/humbug/box/blob/master/doc/installation.md#installation).

Then run

```
composer run compile

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~325 days

Total

3

Last Release

1522d ago

Major Versions

0.1.0 → 1.0.02021-10-08

PHP version history (2 changes)0.1.0PHP &gt;=7.2.5

1.0.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c9f106db319e8698dcb4aedfe8034f0442d379ebbd78fcd67b884999b2236f1?d=identicon)[Sebobo](/maintainers/Sebobo)

---

Top Contributors

[![Sebobo](https://avatars.githubusercontent.com/u/596967?v=4)](https://github.com/Sebobo "Sebobo (14 commits)")[![bwaidelich](https://avatars.githubusercontent.com/u/307571?v=4)](https://github.com/bwaidelich "bwaidelich (1 commits)")[![markusguenther](https://avatars.githubusercontent.com/u/1014126?v=4)](https://github.com/markusguenther "markusguenther (1 commits)")

---

Tags

hacktoberfestneos-cmssplityamlyamlneoscms

### Embed Badge

![Health badge](/badges/shel-yaml-splitter/health.svg)

```
[![Health](https://phpackages.com/badges/shel-yaml-splitter/health.svg)](https://phpackages.com/packages/shel-yaml-splitter)
```

###  Alternatives

[spatie/yaml-front-matter

A to the point yaml front matter parser

3411.8M68](/packages/spatie-yaml-front-matter)[pragmarx/yaml

Load your Laravel config files using yaml

1152.8M29](/packages/pragmarx-yaml)[dragon-code/codestyler

A tool to automatically fix Coding Style Standards issues by The Dragon Code.

291.8M16](/packages/dragon-code-codestyler)[sspooky13/yaml-standards

Standards for yaml files

11518.3k3](/packages/sspooky13-yaml-standards)[mhujer/yaml-sort-checker

YAML sort checker checks if your YML files are properly sorted to prevent merge conflicts

2361.6k](/packages/mhujer-yaml-sort-checker)[thunderer/serializard

Flexible serializer

2767.3k1](/packages/thunderer-serializard)

PHPackages © 2026

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