PHPackages                             cleup/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cleup/config

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cleup/config
============

Web application configuration

1.0.3(7mo ago)022MITPHPPHP &gt;=8.1

Since Jan 18Pushed 7mo ago1 watchersCompare

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

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

Cleup - Configuration
=====================

[](#cleup---configuration)

#### Installation

[](#installation)

Install the `cleup/config` library using composer:

```
composer require cleup/config

```

##### Initialization

[](#initialization)

```
$configuration = new Cleup\Configuration\Loader([
    'debug' => false,
    'cache' => true,
    'cachePath' => __DIR__ . '/cache/config',
    'configPath' => __DIR__ . '/config',
    'env' => true,
    'envPath' => __DIR__
]);

$configuration->load();
```

##### Creating configuration and environment files

[](#creating-configuration-and-environment-files)

config/app.php

```
return [
    "site_name" =>  'Cleup',
    "is_active" => true,
    "port"   => 80
];
```

config/modules/articles.php

```
return [
    "name" =>  'Articles',
    "description" => "This is the articles module"
];
```

.env (.env.production or .env.local if debugging is enabled)

```
APP_NAME=Cleup
BOOL_TRUE=true
BOOL_FALSE=false
# Comment
INTIGER=2007
FLOAT=22.122002
```

##### Methods

[](#methods)

```
use Cleup\Configuration\Config;
use Cleup\Configuration\Environment\Env;

# Get
// where “app” is the name of the file
Config::get('app.site_name'); // string(Cleup)
// where “modules” is the directory name and “articles” is the file name
Config::get('modules.articles.description'); // string(This is the articles module)
// The default value
Config::get('app.oops', 'Some kind of a default value'); // string(Some kind of a default value)
// Environment
Env::get('APP_NAME');  // string(Cleup);
Env::get('BOOL_TRUE'); // bool(true);
Env::get('INTIGER');   // int(2007);
Env::get('FLOAT');     // float(22.122002);
Env::get('OOPS', 404); // int(404);

# Set - The methods do not change the structure of the underlying configuration and environment files.
Config::set('modules.articles.id', 35);
Env::set('LEVEL', 'Admin');

# Helpers
config('app.site_name') // string(Cleup),
env('APP_NAME')         // string(Cleup),
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance63

Regular maintenance activity

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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 ~258 days

Total

2

Last Release

223d ago

### Community

Maintainers

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

---

Top Contributors

[![cleup](https://avatars.githubusercontent.com/u/156127069?v=4)](https://github.com/cleup "cleup (5 commits)")

---

Tags

configurationconfigenvironmentenv

### Embed Badge

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

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

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

3.2k493.9M1.6k](/packages/symfony-options-resolver)[symfony/dotenv

Registers environment variables from a .env file

3.8k226.7M2.3k](/packages/symfony-dotenv)[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[cekurte/environment

A library to get the values from environment variables and process to php data types

5884.0k7](/packages/cekurte-environment)

PHPackages © 2026

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