Download the PHP package jonpugh/ash without Composer
On this page you can find all versions of the php package jonpugh/ash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package ash
Short Description Global CLI for managing sites using Consolidation Site Aliases.
License MIT
Informations about the package ash
Ash: Site Alias Shell
A global CLI to list sites and run commands on them. Very similar to global drush site:alias command.
Overview
This project is a global cli designed to run commands against multiple sites using Consolidation's Site Aliases.
This is a possible replacement for global Drush.
Commands
Alias syntax
For simpler access to the site:exec command, you can use the alias syntax:
ash @alias command-to-execute
History
This tool was built from the ashes of a small tool created by the consolidation/site-alias team called alias-tool.
It was inspired by the need to retire global drush.
Installation
Ash is a CLI designed to run globally, but can be installed in a composer project as well. Here are 3 options for installing:
-
Site local
composer requirecomposer require jonpugh/ash` -
Composer Global require command and add to PATH:
-
Run the following command to install
ashto your user's global composer directory:composer global require jonpugh/ash -
To make
ashavailable globally, set the PATH variable:export PATH="~/$COMPOSER_HOME/vendor/bin:$PATH"Put this in your
~/.bashrcor similar file.
Notes:
- This will install a
composer.jsonfile to the globalCOMPOSER_HOMEdirectory. - The bin scripts will be installed in
$COMPOSER_HOME/vendor/bin. -
Your
COMPOSER_HOMEmay vary. Refer to thecomposer global --helpcommand for more information aboutCOMPOSER_HOME. - From
composer global --help:
-
-
Source install.
For development, install the source, and if desired, set a symlink to make
ashavailable globally. -
Phar install.
Coming Soon.
Setup
Once the ash command works, you need to tell it where your sites are. You can create alias files manually, or use the site:add command.
ash site:add
This command makes it easy to add new global site aliases.
To use, run ash site:add in the directory to your Drupal site. (@todo: allow adding from any directory)
If your site has the file ./drush/sites/self.yml, these aliases will be included in the global alias list.
Configuration
See ash.yml for default config:
Put alias files in one of the directories defined in alias_directories.
Remember to name the files $APP.site.yml instead of self.site.yml
See Drush Site Alias Documentation for details on how to create alias files.
Usage
Given you have added the example file examples/operations.site.yml to $HOME/.ash/operations.site.yml, you can run the following commands:
List all aliases
List site local aliases.
If you are running ash from a drupal codebase, it will detect and load all aliases in the drush/sites folder.
These aliases are also compatible with drush.
Run a command on the site
The main ash site:exec command uses SiteAlias & SiteProcess, so commands will automatically be run on the remote server via SSH. See additional options at https://www.drush.org/12.x/site-aliases/#additional-site-alias-options
Docker-compose aliases can also be used. https://www.drush.org/12.x/site-aliases/#docker-compose-and-other-transports)
If options are needed, use the -- as divider between ash command and target command.
Ash aliases are drush aliases, so this is an equivalent command:
@TODO
- Allow aliases to only contain name.environment. Currently all aliases get
@ashpre-pended. - Allow syntax
ash @alias commandinstead ofash site:exec @alias command. Need to find out how drush processes argv to set current alias.
Contributing
Please read CONTRIBUTING.md for details on the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the releases page.
Authors
- Jon Pugh
- Greg Anderson - Original
alias-toolscript and command files.
See also the list of contributors who participated in this project. Thanks also to all of the drush contributors who contributed directly or indirectly to site aliases.
License
This project is licensed under the MIT License - see the LICENSE file for details
All versions of ash with dependencies
consolidation/robo Version ^4.0
consolidation/site-process Version ^5.2