PHPackages                             drunomics/phapp-cli - 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. drunomics/phapp-cli

ActiveLibrary

drunomics/phapp-cli
===================

Provides standardized console commands for PHP applications.

0.7.2(1y ago)7193[11 issues](https://github.com/drunomics/phapp-cli/issues)[1 PRs](https://github.com/drunomics/phapp-cli/pulls)MITPHPPHP &gt;=7.4

Since Dec 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/drunomics/phapp-cli)[ Packagist](https://packagist.org/packages/drunomics/phapp-cli)[ RSS](/packages/drunomics-phapp-cli/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (8)Versions (40)Used By (0)

Phapp CLI
=========

[](#phapp-cli)

Provides standardized console commands for PHP applications.

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

[](#requirements)

- Git version &gt;= 2.0
- Bash 4.\*
- PHP &gt;5.6|&gt;7.0

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

[](#installation)

Installation requires composer. As there are some dependency conflicts with the latest drush release it is recommended to install the tool via consolidation/cgr. To do so, just execute:

```
# Download latest stable release.
php -r "
  ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)');
  readfile(json_decode(file_get_contents('https://api.github.com/repos/drunomics/phapp-cli/releases/latest'))->assets[0]->browser_download_url);
" > phapp
chmod +x phapp

# Optional: Ensure ~/bin exists and configure it to be available in $PATH.
[ -d ~/bin ] || mkdir ~/bin
echo $PATH | grep -q ~/bin || (echo "export PATH=~/bin:\$PATH" >> ~/.bashrc && export PATH=~/bin:$PATH)

# Make phapp executable from everywhere by moving to a destination available in $PATH.
# If you skipped the optional step above, be sure to move it to a suiting destination.
mv phapp ~/bin/phapp

```

Updating
--------

[](#updating)

Run

```
 phapp self:update

```

Usage
-----

[](#usage)

Run `phapp list` to show a list of support commands and use `phapp command --help`for more information about a command. The list of currently available commands is:

```
  build                 Builds the project with the current code checkout.
  clone                 Clones a Phapp project.
  create                Creates a new project base on a given template.
  help                  Displays help for a command
  init                  Initializes the app.
  install               Installs the application.
  list                  Lists commands
  setup                 Setups the phapp environment.
  status                Checks for a working and installed application.
  update                Updates the app.
 build
  build:branch          Builds a given branch.
  build:clean           Cleans all build related files.
 git
  git:pull              Updates local branches by pull from remote repositories.
  git:setup-remotes     Configures Git remote repositories.
 init
  init:manifest         Initializes a new phapp.yml for your project.
 self
  self:update           Updates the installed phar.

```

phapp.yml
---------

[](#phappyml)

An application provides basic metadata and customizes commands in its `phapp.yml`, the phapp manifest. See [examples/phapp.yml](https://github.com/drunomics/phapp-cli/blob/master/examples/phapp.yml)for an example.

Phapp environment variables
---------------------------

[](#phapp-environment-variables)

Commands defined in `phapp.yml` may make use of the phapp environment variables.

### Dotenv support

[](#dotenv-support)

Phapp environment variables are either set by the environment; i.e. the host, or via a [.env](https://symfony.com/doc/current/components/dotenv.html)file.

In order to help with initializing the environment based upon one or multiple .env files the `environment` command may be used. This command is prepended the other commands (except setup) such that they may rely on the initialized environment.

Thus, the .env file can be written as part of the `setup` command and sourced as part of the `environment` command.

### Available variables

[](#available-variables)

Available environment variables are / must be:

VariableDescriptionExample valuePHAPP\_ENVThe environment name. E.g., local, test or livelivePHAPP\_ENV\_TYPEThe environment type; e.g. an id for the hosting environment or type of server.acquiaPHAPP\_ENV\_MODEThe environment mode; valid values are: production, developmentproductionPHAPP\_BASE\_URLThe base URL of the app.Optional environment variables are:

VariableDescriptionExample valuePHAPP\_ENV\_COLORA color used for indicating the current environment.302f2f### Database connection.

[](#database-connection)

```
PHAPP_ENV_MYSQL_DEFAULT_DATABASE=database
PHAPP_ENV_MYSQL_DEFAULT_USERNAME=user
PHAPP_ENV_MYSQL_DEFAULT_PASSWORD=pass
PHAPP_ENV_MYSQL_DEFAULT_HOST=localhost
PHAPP_ENV_MYSQL_DEFAULT_PORT="3306"

```

### Various other variables provided by the environment.

[](#various-other-variables-provided-by-the-environment)

```
PHAPP_ENV_DUMP_DIR="/data/mysql_dumps/sync"
PHAPP_ENV_DUMP_DB_FILENAME="${PHAPP_ENV_MYSQL_DEFAULT_DATABASE}-$(date -d "1 day ago" +%Y%m%d).sql.gz"

```

Phapp development
-----------------

[](#phapp-development)

### Build a new phar

[](#build-a-new-phar)

The phar is built using box, for details see . To built the phar just run:

```
 composer install --dev
 composer build

```

### Create a new release

[](#create-a-new-release)

- Tag a new version and push it.
- Build a new phar (see above).
- Upload the new phar at the github release page. Keep the filename as is.
- Note that the packagist API is not updated immediately. Thus it takes a few minutes until the new release is picked up by the self:update command.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 67.5% 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 ~85 days

Recently: every ~598 days

Total

35

Last Release

529d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/132232?v=4)[Wolfgang Ziegler](/maintainers/fago)[@fago](https://github.com/fago)

---

Top Contributors

[![fago](https://avatars.githubusercontent.com/u/132232?v=4)](https://github.com/fago "fago (56 commits)")[![rthideaway](https://avatars.githubusercontent.com/u/5792505?v=4)](https://github.com/rthideaway "rthideaway (15 commits)")[![vasike](https://avatars.githubusercontent.com/u/514846?v=4)](https://github.com/vasike "vasike (5 commits)")[![ivangrozni](https://avatars.githubusercontent.com/u/3587288?v=4)](https://github.com/ivangrozni "ivangrozni (3 commits)")[![Nebel54](https://avatars.githubusercontent.com/u/2241938?v=4)](https://github.com/Nebel54 "Nebel54 (1 commits)")[![hatsch](https://avatars.githubusercontent.com/u/240158?v=4)](https://github.com/hatsch "hatsch (1 commits)")[![arthurlorenz](https://avatars.githubusercontent.com/u/11928191?v=4)](https://github.com/arthurlorenz "arthurlorenz (1 commits)")[![petarbasic](https://avatars.githubusercontent.com/u/52317999?v=4)](https://github.com/petarbasic "petarbasic (1 commits)")

---

Tags

phapp-clipharphpphp-applications

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/drunomics-phapp-cli/health.svg)

```
[![Health](https://phpackages.com/badges/drunomics-phapp-cli/health.svg)](https://phpackages.com/packages/drunomics-phapp-cli)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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