decodelabs / effigy
Universal CLI entry point
Installs: 9 071
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- composer-runtime-api: ^2.2
- decodelabs/archetype: ^0.3
- decodelabs/atlas: ^0.12
- decodelabs/clip: ^0.3.2
- decodelabs/dictum: ^0.6
- decodelabs/exceptional: ^0.4
- decodelabs/genesis: ^0.9
- decodelabs/integra: ^0.1.4
- decodelabs/lucid: ^0.4.7
- decodelabs/systemic: ^0.11
- decodelabs/terminus: ^0.10.1
- decodelabs/veneer: ^0.11.6
- ondram/ci-detector: ^4.1
- php-parallel-lint/php-parallel-lint: ^1.3
- symplify/easy-coding-standard: ^12.1
Requires (Dev)
- decodelabs/phpstan-decodelabs: ^0.6.10
- dev-develop / 0.4.x-dev
- v0.4.29
- v0.4.28
- v0.4.27
- v0.4.26
- v0.4.25
- v0.4.24
- v0.4.23
- v0.4.22
- v0.4.21
- v0.4.20
- v0.4.19
- v0.4.18
- v0.4.17
- v0.4.16
- v0.4.15
- v0.4.14
- v0.4.13
- v0.4.12
- v0.4.11
- v0.4.10
- v0.4.9
- v0.4.8
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-main
This package is auto-updated.
Last update: 2024-11-06 11:19:05 UTC
README
Universal CLI entry point
Effigy is a globally installed universal CLI tool for easily running tasks in your application.
Get news and updates on the DecodeLabs blog.
Installation
composer global require decodelabs/effigy
You will also need to have added your global composer installation bin directory to your $PATH in your ~/.bash_profile or ~/.bashrc file:
export PATH=~/.config/composer/vendor/bin:$PATH
Note, earlier versions of composer may store global config in ~/.composer/vendor/bin
- adapt your $PATH as necessary. You can find composer's home path with composer global config home
Usage
Effigy can be used to simplify running tasks in your project from the command line. Its primary job is to locate and load the main entry point to your project via a globally installed executable.
Say for example, you currently run commands in your project though webroot/index.php
as your primary entry point:
php webroot/index.php run-task
Define your entry point in your composer.json file:
{ "extra": { "effigy": { "entry": "webroot/index.php" } } }
Then you can run CLI commands available in your project via the effigy
executable directly:
effigy run-task
Should you need per-environment entry files, specify template keys in your composer config:
{ "extra": { "effigy": { "entry": "entry/{{env}}.php" } } }
Then on first run, Effigy will ask for the "env" parameter and save it in a local config file (which gets added to your .gitignore).
Local installation
If you don't want to install Effigy globally, you can use it as a local executable in your project.
composer require decodelabs/effigy vendor/bin/effigy install-local
You can then call effigy like so:
./effigy run-task
PHP binary
Effigy can use alternative versions of PHP on a per-project basis:
effigy set-php
> php8.1
The bin path is stored in your local config and all process launches will use this going forward. Reset it to "php" to use the default system global binary.
Composer passthrough
Effigy will attempt to run scripts defined in your composer.json:
{ "scripts": { "analyze": "phpstan analyze" } }
effigy analyze
You can also run composer commands through effigy directly:
effigy composer require decodelabs/atlas
This is especially useful if you have defined an alternative version of PHP for your project as global composer will use global PHP.
Licensing
Effigy is licensed under the MIT License. See LICENSE for the full license text.