civicrm / cli-tools
Installs: 9 858
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- civicrm/composer-downloads-plugin: ^3.0 || ^4.0
- dev-master
- v2024.09.28.1727563115
- v2024.09.28.1727560481
- v2024.09.26.1727373904
- v2024.09.19.1726740854
- v2024.09.18.1726664796
- v2024.09.18.1726655400
- v2024.01.28.1706405644
- v2023.10.30.1698625846
- v2023.10.19.1697748572
- v2023.10.19.1697706079
- v2023.10.06.1696616551
- v2023.10.06.1696612947
- v2023.10.06.1696574741
- v2023.10.06.1696571353
- v2023.10.06.1696569021
This package is auto-updated.
Last update: 2024-11-28 23:11:42 UTC
README
A bundle of CiviCRM-specific command-line tools. This specifically includes:
cv
: General purpose administration / Swiss Army knifecivistrings
: Scan source-code for translatable stringscivix
: Generate extensionscoworker
: Execute background jobs
This is intended for site-builders who have composer
-based deployments (esp Drupal 9/10).
It supports workflows based on composer require
, composer update
, and vendor-bin
.
Usage
To add these tools to an existing composer
build (e.g. Drupal 9/10 site), run:
composer require civicrm/cli-tools
This adds CiviCRM CLI tools to composer's vendor/bin
folder.
You can call commands through composer exec
or vendor/bin
:
## Example 1: Call cv through `composer exec` composer exec cv api4 Contact.get +l 1 ## Example 2: Call cv through `./vendor/bin` ./vendor/bin/cv api4 Contact.get +l 1 ## Example 3: Add cv your PATH PATH="/path/to/vendor/bin:$PATH" cv api4 Contact.get +l 1
In depth
- This is like a subset of
civicrm-buildkit
. It omits general development tools (phpunit
), CMS-building tools (drush
,wp
), standard runtime environments (min
,max
), and autobuild sites (drupal-clean
,wp-demo
, etc). This is only the Civi-specific stuff that you would want to add on top of D9/D10 sites. - The bridge here has 3 simple pieces:
- Download each executable via
composer-downloads-plugin
(e.g.extern/cv.phar
). - Add a stub script (e.g.
bin/cv
) - Register the stub (
bin/cv
) for use with composer'svendor/bin/
.
- Download each executable via
- This layout should be able to leverage composer's platform-specific wiring (e.g. Windows
.bat
files).