If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
This add-on provides project-level DDEV web-container commands for the CiviCRM command-line tools distributed by civicrm/cli-tools.
| DDEV command | Alias | Tool | Purpose |
|---|---|---|---|
ddev cv |
— | cv |
Administer, inspect, and develop a CiviCRM installation |
ddev civix |
ddev cvx |
civix |
Develop and maintain CiviCRM extensions |
ddev civistrings |
ddev cvstr |
civistrings |
Extract translatable strings into gettext templates |
ddev coworker |
ddev cowkr |
coworker |
Run and inspect CiviCRM worker processes |
The add-on installs lightweight command wrappers in the project’s .ddev directory. It does not install CiviCRM or civicrm/cli-tools itself.
ddev commands.civix, civistrings, and coworker.vendor/bin executable is unavailable.civicrm/cli-tools can be installedThe wrappers are CMS-neutral. Actual CMS, PHP, and CiviCRM compatibility is determined by CiviCRM and the individual upstream CLI tools.
Run these commands from the DDEV project root:
ddev add-on get vinugawade/ddev-civicrm-cli-tools
ddev restart
Install the CiviCRM CLI tools as a development dependency:
ddev composer require --dev civicrm/cli-tools
Omit --dev only when the project intentionally manages these tools as a regular production dependency.
Verify the installation:
ddev cv --version
ddev civix --version
ddev civistrings --version
ddev coworker --version
After installation, commit the generated .ddev files together with the appropriate Composer files according to the project’s dependency policy:
git add .ddev composer.json composer.lock
To install a specific release instead of the latest stable release:
ddev add-on get vinugawade/ddev-civicrm-cli-tools --version v1.0.2
ddev restart
Update the add-on to its latest stable release:
ddev add-on get vinugawade/ddev-civicrm-cli-tools
ddev restart
The add-on and the Composer package are versioned independently. Update the CiviCRM CLI tools separately when required:
ddev composer update civicrm/cli-tools --with-dependencies
Review and commit the resulting .ddev, composer.json, and composer.lock changes.
List add-ons installed in the current project:
ddev add-on list --installed
Remove this add-on:
ddev add-on remove ddev-civicrm-cli-tools
ddev restart
Removing the add-on deletes its DDEV wrappers but does not automatically remove the Composer package. Remove that separately when it is no longer needed:
ddev composer remove civicrm/cli-tools
Pass any supported upstream arguments after the DDEV command. Use --help to inspect the options provided by each tool.
cvddev cv --help
ddev cv status
ddev cv flush
ddev cv updb
ddev cv api4 Contact.get +l 1
Commands such as status, flush, updb, and api4 require cv to locate and bootstrap a valid CiviCRM installation.
civixddev civix --help
ddev civix civicrm:ping
ddev civix build:zip
ddev cvx --version
Run extension-specific commands from an appropriate extension directory when required by civix.
civistringsddev civistrings --help
ddev civistrings -o my-extension.pot path/to/extension
ddev cvstr --version
coworkerddev coworker --help
ddev coworker --version
ddev cowkr --version
The add-on installs command scripts under .ddev/commands/web. DDEV executes these scripts inside the project’s web container, where they call the corresponding executable from the project’s Composer vendor/bin directory.
This keeps the tools project-specific and avoids relying on global host installations.
ddev add-on list --installed
ddev restart
If installation or updating fails, rerun it with verbose output:
ddev add-on get vinugawade/ddev-civicrm-cli-tools --verbose
ddev composer show civicrm/cli-tools
ddev exec ls -la \
vendor/bin/cv \
vendor/bin/civix \
vendor/bin/civistrings \
vendor/bin/coworker
If the package is installed under require-dev, a Composer install using --no-dev will intentionally omit these binaries. Restore the local development dependencies with:
ddev composer install
ddev restart
A successful version check confirms that the add-on wrapper can execute the installed CLI binary:
ddev cv --version
A command such as the following additionally verifies that cv can find and bootstrap CiviCRM:
ddev cv status
When --version succeeds but status fails, investigate the CiviCRM/CMS installation, document root, settings files, permissions, and upstream tool requirements rather than reinstalling the add-on.
The BATS suite installs the real civicrm/cli-tools package, downloads the official tool PHARs, installs the add-on, verifies every primary command and alias, and tests missing-binary error handling. It does not use fake fallback binaries.
On macOS or Linux with Homebrew:
brew tap bats-core/bats-core
brew install \
bats-core \
bats-core/bats-core/bats-assert \
bats-core/bats-core/bats-file \
bats-core/bats-core/bats-support \
jq
Run the current-directory add-on test during development:
bats ./tests/test.bats --filter-tags '!release'
Run the complete suite, including installation from the latest published release:
bats ./tests/test.bats
Check the repository against the current DDEV add-on template and maintenance rules:
ddev utility addon-update-checker
main..
├── .github
│ ├── ISSUE_TEMPLATE
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows
│ └── tests.yml
├── commands
│ └── web
│ ├── civistrings
│ ├── civix
│ ├── coworker
│ └── cv
├── tests
│ ├── test.bats
│ └── testdata
├── .editorconfig
├── .gitattributes
├── install.yaml
├── LICENSE
└── README.md
Contributions are welcome.
ddev utility addon-update-checker.Vinay Gawade
Thanks to the CiviCRM and DDEV communities for maintaining the underlying tools, documentation, testing infrastructure, and add-on ecosystem.
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.