civicrm/cli-tools
最新稳定版本:v2025.12.06.1764981525
Composer 安装命令:
composer require civicrm/cli-tools
包简介
README 文档
README
A bundle of CiviCRM 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
.batfiles).
Maintenance
This project is derived from civicrm-buildkit.git:phars.json. Whenever there's a relevant update to phars.json, we should also update civicrm-cli-tools.
For a maintainer of civicrm/civicrm-cli-tools.git, you can follow these steps:
git clone git@github.com:civicrm/civicrm-cli-tools.git cd civicrm-cli-tools ./scripts/update git push <FIXME>
Note the output of ./script/update. It will include details about how to push the update.
统计信息
- 总下载量: 31.28k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0
- 更新时间: 2023-10-06