unit icon indicating copy to clipboard operation
unit copied to clipboard

CLI: New subcommand for listing applications

Open javorszky opened this issue 9 months ago • 0 comments

A new command unitctl app list or unitctl apps list (I propose both singular and plural would work here, but not with restarting the app).

Related to #1279.

Given the following unit json:

{
    "applications": {
        "hello-world": {
            "type": "php",
            "root": "/www/hw/public/",
            "script": "index.php",
            "environment": {
                "PHP_INI_SCAN_DIR": ":/tmp/php.inis/"
            }
        },
        "other-one": {
            "type": "php",
            "root": "/www/oo/public/",
            "script": "index.php",
            "environment": {
                "PHP_INI_SCAN_DIR": ":/tmp/php.inis/"
            }
        }
    }
}

The output of unitctl app list would be

hello-world
  type: php
  root: /www/hw/public
  script: index.php
  environment:
    PHP_INI_SCAN_DIR: /tmp/php.inis

other-one
  type: php
  root: /www/oo/public/
  script: index.php
  environment:
    PHP_INI_SCAN_DIR: /tmp/php.inis/

javorszky avatar May 20 '24 21:05 javorszky