PHPackages                             curatorium/easy-config - 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. curatorium/easy-config

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

curatorium/easy-config
======================

CLI to generate environment-specific configuration files

0219PHP

Since Jun 22Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/curatorium/easy-config)[ Packagist](https://packagist.org/packages/curatorium/easy-config)[ RSS](/packages/curatorium-easy-config/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

**Easy Config**
===============

[](#easy-config)

***A command to generate environment-specific configuration files***

Takes YAML files as input, resolves config values for the requested environment, and applies those values to a template. It allows you to inherit common settings and selectively override only what’s necessary. It reduces the need to maintain duplicate settings files for different environments.

A configuration entry with params:

```
acme:Website:                  # ::
  host: acme.devel             #   :
  host@prod: acme.com          #   @:
  host@prod-1: acme.com        #   @:
  host@prod-2: acme.net        #   @:
```

Will be resolved for the `prod-2` environment as (`cat acme.yml | ez-cfg prod-2 --resolve`):

```
acme:Website:
  host: acme.net
```

Step-by-step here's what it does:

- Ingests YAML/[eYAML](# "Just eJSON converted to YAML") or JSON/[eJSON](https://github.com/Shopify/ejson) configuration files
- Resolves the configuration entries for your specific environment, merging them with the base-environment defaults, and environment-unspecific defaults
- Resolves defaults for your configuration entry, merging them with the entry's type defaults, and global defaults
- Applies each configuration entry to a template engine to generate the final configuration files

### Installation

[](#installation)

```
composer global require curatorium/easy-config
```

#### Requirements

[](#requirements)

- PHP &gt;= 8.2
- PHP extension for YAML
- for eJSON you need to install [ejson](https://github.com/Shopify/ejson) globally
- for eYAML you need to install [yq](https://github.com/mikefarah/yq) and the `eyaml` command (provided by this package) globally

### Usage

[](#usage)

Pure command line:

```
easy-config --template=templates/ --extension=tpl prod-2 -- *.json *.ejson *.yaml *.eyaml
```

...or via configuration file `.easy-config`:

```
in-files: ['*.json', '*.ejson', '*.yaml', '*.eyaml']
out-files: '${env}/${tags.type}/${tags.name}.conf'

templates: templates/
```

### Syntax

[](#syntax)

```
# Configuration entry: a named map containing several parameters.
#
#  the name of the config entry (**required**)
#  |
#  |     type specifier (**required**)
#  ▼     ▼
:@:
#               ▲
#             environment specifier (**optional**); when omitted, the entry/param, will apply to all environments;
#             ▼
    @:
#      ▲
#      parameter name (**required**)

#      Entry tags (key/value, implicitly includes: type, module, feature, name, fullname, ext)
#      ▼
    ::

# Type defaults: a named map containing default parameters shared by all entries of that type.
#
#  type specifier (**required**)
#  ▼
:@:
    @:

# Global defaults: a named map containing default parameters shared by all entries.
#
#   type name Default is reserved for global defaults
#   ▼
:Default@:
    @:
```

#### Note:

[](#note)

`` can be composed of a prefix (called base environment, ex.: 'test', 'prod') followed by a `-` and a suffix. Base environments can add another layer of defaults that the full environment can inherit.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance40

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity14

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/60ee24787511ba533b00897d359773c394bc11987dc75a6b15a75924a35ba61d?d=identicon)[mihai-stancu](/maintainers/mihai-stancu)

---

Top Contributors

[![mihai-stancu](https://avatars.githubusercontent.com/u/1294142?v=4)](https://github.com/mihai-stancu "mihai-stancu (1 commits)")

### Embed Badge

![Health badge](/badges/curatorium-easy-config/health.svg)

```
[![Health](https://phpackages.com/badges/curatorium-easy-config/health.svg)](https://phpackages.com/packages/curatorium-easy-config)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)[thettler/laravel-console-toolkit

This Package provides some usefully console features like the attribute syntax for arguments and options, validation, auto ask and casting.

324.1k](/packages/thettler-laravel-console-toolkit)

PHPackages © 2026

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