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

040PHP

Since Sep 16Pushed 8mo 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 1mo ago

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

18

—

LowBetter than 8% of packages

Maintenance43

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity13

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

[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)
