PHPackages                             jdwx/app - 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. jdwx/app

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

jdwx/app
========

A trivial PHP framework for command line apps.

v1.2.1(4w ago)17051MITPHPPHP &gt;=8.3.0

Since Apr 10Pushed 2w ago1 watchersCompare

[ Source](https://github.com/jdwx/app)[ Packagist](https://packagist.org/packages/jdwx/app)[ RSS](/packages/jdwx-app/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (26)Versions (35)Used By (1)

jdwx/app
========

[](#jdwxapp)

A trivial PHP framework for command line apps.

This is primarily useful when you have a bunch of discrete command-line applications in a PHP codebase. It keeps things out of the global namespace, especially functions called "main," without a lot of boilerplate code.

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

[](#installation)

You can require it directly with Composer:

```
composer require jdwx/app
```

Or download the source from GitHub:

Requirements
------------

[](#requirements)

This framework requires PHP 8.3 or later. It might work with earlier versions of PHP 8, but it has not been tested with them.

Usage
-----

[](#usage)

To use this framework, create a class that extends the Application class and implements a protected main() method. The main() method should return an integer, which will be the exit status of the process. If you do not want the application to terminate the process after the main() function returns, you can override the exit() method.

The Application class takes advantage of the [jdwx/args](https://github.com/jdwx/args) library to provide robust type-safe handling of command-line arguments. It also supports the PSR LoggerInterface standard.

```
require 'vendor/autoload.php';

(new class( $argv ) extends \JDWX\App\Application {

    protected function main() : int {
        echo "Hello, world!\n";
        if ( $this->args->empty() ) {
            echo "You didn't enter anything.\n";
        } else {
            echo "You entered: ", $this->args->endWithString(), "\n";
        }
        return 0;
    }

})->run();
```

Stability
---------

[](#stability)

This framework is considered stable and is used in production code. However, because it is used primarily for interactive tasks, it is difficult to fully test. It is recommended that you test your applications thoroughly.

History
-------

[](#history)

This framework was refactored out of a larger codebase and first released as part of the [jdwx/cli](https://github.com/jdwx/cli) framework before quickly being separated into its own standalone module in 2024 for the benefit of command-line applications that are *not* REPL-style interactive tools.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance95

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

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

Recently: every ~4 days

Total

33

Last Release

29d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.2.0

v1.2.0PHP &gt;=8.3.0

### Community

Maintainers

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

---

Top Contributors

[![jdwx](https://avatars.githubusercontent.com/u/2722779?v=4)](https://github.com/jdwx "jdwx (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jdwx-app/health.svg)

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

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.3k](/packages/symfony-http-kernel)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22572.4M21](/packages/consolidation-annotated-command)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k861.3k83](/packages/humbug-box)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[crunzphp/crunz

Schedule your tasks right from the code.

2342.3M7](/packages/crunzphp-crunz)

PHPackages © 2026

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