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.3(2mo ago)18031MITPHPPHP &gt;=8.3.0

Since Apr 10Pushed 2mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (33)Versions (36)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

49

—

FairBetter than 94% of packages

Maintenance88

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community12

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

Total

34

Last Release

61d 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 (60 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.1k886.6M9.4k](/packages/symfony-http-kernel)[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k382.4M3.6k](/packages/symfony-cache)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[league/climate

PHP's best friend for the terminal. CLImate allows you to easily output colored text, special formats, and more.

1.9k15.0M310](/packages/league-climate)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k19](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

569591.1k61](/packages/ecotone-ecotone)

PHPackages © 2026

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