{"id":21674339,"url":"https://github.com/drunomics/phapp-cli","last_synced_at":"2025-04-12T04:24:03.357Z","repository":{"id":13565916,"uuid":"74765939","full_name":"drunomics/phapp-cli","owner":"drunomics","description":"Standardized console commands for managing PHP applications.","archived":false,"fork":false,"pushed_at":"2025-01-20T14:13:14.000Z","size":244,"stargazers_count":7,"open_issues_count":10,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T18:57:23.532Z","etag":null,"topics":["phapp-cli","phar","php","php-applications"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drunomics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-25T14:40:50.000Z","updated_at":"2024-12-02T13:06:53.000Z","dependencies_parsed_at":"2024-11-25T16:03:00.580Z","dependency_job_id":null,"html_url":"https://github.com/drunomics/phapp-cli","commit_stats":{"total_commits":151,"total_committers":9,"mean_commits":16.77777777777778,"dds":0.576158940397351,"last_synced_commit":"8c4aed0f0d0e4aee8dbb86a26de252fdde4d3b01"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fphapp-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fphapp-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fphapp-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fphapp-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drunomics","download_url":"https://codeload.github.com/drunomics/phapp-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514902,"owners_count":21117058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["phapp-cli","phar","php","php-applications"],"created_at":"2024-11-25T13:44:09.217Z","updated_at":"2025-04-12T04:24:03.350Z","avatar_url":"https://github.com/drunomics.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phapp CLI\n\nProvides standardized console commands for PHP applications.\n\n## Requirements\n\n * Git version \u003e= 2.0\n * Bash 4.*\n * PHP \u003e5.6|\u003e7.0\n\n## Installation\n\nInstallation requires composer. As there are some dependency conflicts with the\nlatest drush release it is recommended to install the tool via consolidation/cgr.\nTo do so, just execute:\n\n    # Download latest stable release.\n    php -r \"\n      ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)');\n      readfile(json_decode(file_get_contents('https://api.github.com/repos/drunomics/phapp-cli/releases/latest'))-\u003eassets[0]-\u003ebrowser_download_url);\n    \" \u003e phapp\n    chmod +x phapp\n    \n    # Optional: Ensure ~/bin exists and configure it to be available in $PATH.\n    [ -d ~/bin ] || mkdir ~/bin\n    echo $PATH | grep -q ~/bin || (echo \"export PATH=~/bin:\\$PATH\" \u003e\u003e ~/.bashrc \u0026\u0026 export PATH=~/bin:$PATH)\n    \n    # Make phapp executable from everywhere by moving to a destination available in $PATH.\n    # If you skipped the optional step above, be sure to move it to a suiting destination.\n    mv phapp ~/bin/phapp\n \n## Updating\n\nRun\n      \n     phapp self:update\n     \n## Usage\n\nRun `phapp list` to show a list of support commands and use `phapp command --help`\nfor more information about a command. The list of currently available commands\nis:\n\n      build                 Builds the project with the current code checkout.\n      clone                 Clones a Phapp project.\n      create                Creates a new project base on a given template.\n      help                  Displays help for a command\n      init                  Initializes the app.\n      install               Installs the application.\n      list                  Lists commands\n      setup                 Setups the phapp environment.\n      status                Checks for a working and installed application.\n      update                Updates the app.\n     build\n      build:branch          Builds a given branch.\n      build:clean           Cleans all build related files.\n     git\n      git:pull              Updates local branches by pull from remote repositories.\n      git:setup-remotes     Configures Git remote repositories.\n     init\n      init:manifest         Initializes a new phapp.yml for your project.\n     self\n      self:update           Updates the installed phar.\n      \n## phapp.yml\n\nAn application provides basic metadata and customizes commands in its \n`phapp.yml`, the phapp manifest. See [examples/phapp.yml](https://github.com/drunomics/phapp-cli/blob/master/examples/phapp.yml)\nfor an example.\n      \n## Phapp environment variables\n\nCommands defined in `phapp.yml` may make use of the phapp environment\nvariables.\n\n### Dotenv support\n\nPhapp environment variables are either set by the environment; i.e.\nthe host, or via a [.env](https://symfony.com/doc/current/components/dotenv.html)\nfile.\n\nIn order to help with initializing the environment based upon one or multiple\n.env files the `environment` command may be used. This command is prepended the\nother commands (except setup) such that they may rely on the initialized\nenvironment.\n\nThus, the .env file can be written as part of the `setup` command and sourced\nas part of the `environment` command.\n\n### Available variables\n\nAvailable environment variables are / must be:\n\nVariable | Description | Example value |\n--- | --- | --- |\n| PHAPP_ENV       | The environment name. E.g., local, test or live | live |\n| PHAPP_ENV_TYPE  | The environment type; e.g. an id for the hosting environment or type of server. | acquia |\n| PHAPP_ENV_MODE  | The environment mode; valid values are: production, development | production |\n| PHAPP_BASE_URL  | The base URL of the app. | https://example.com |\n\nOptional environment variables are:\n\nVariable | Description | Example value |\n--- | --- | --- |\n| PHAPP_ENV_COLOR | A color used for indicating the current environment. | 302f2f |\n\n### Database connection.\n\n    PHAPP_ENV_MYSQL_DEFAULT_DATABASE=database\n    PHAPP_ENV_MYSQL_DEFAULT_USERNAME=user\n    PHAPP_ENV_MYSQL_DEFAULT_PASSWORD=pass\n    PHAPP_ENV_MYSQL_DEFAULT_HOST=localhost\n    PHAPP_ENV_MYSQL_DEFAULT_PORT=\"3306\"\n\n### Various other variables provided by the environment.\n    PHAPP_ENV_DUMP_DIR=\"/data/mysql_dumps/sync\"\n    PHAPP_ENV_DUMP_DB_FILENAME=\"${PHAPP_ENV_MYSQL_DEFAULT_DATABASE}-$(date -d \"1 day ago\" +%Y%m%d).sql.gz\"\n\n## Phapp development\n\n### Build a new phar\n\nThe phar is built using box, for details see\nhttps://github.com/box-project/box. To built the phar just run:\n\n     composer install --dev\n     composer build\n\n### Create a new release\n\n* Tag a new version and push it.\n* Build a new phar (see above).\n* Upload the new phar at the github release page. Keep the filename as is.\n* Note that the packagist API is not updated immediately. Thus it takes a few\n  minutes until the new release is picked up by the self:update command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrunomics%2Fphapp-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrunomics%2Fphapp-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrunomics%2Fphapp-cli/lists"}