This DDEV add-on provides seamless integration of essential CiviCRM CLI tools within your DDEV-managed projects. The add-on simplifies the use of tools like civistrings, civix, coworker, and cv, enhancing the developer experience for CiviCRM projects integrated with CMS platforms such as Drupal and Backdrop.
- Simplified Command Execution: Easily run CiviCRM CLI tools directly through DDEV commands.
- Wide Compatibility: Works seamlessly with Drupal (9, 10, 11), Backdrop, and CiviCRM installations.
- Error Handling: Provides clear and actionable error messages for missing dependencies or setup issues.
- Tested Environment: Includes automated BATS tests to validate functionality, ensuring stability and reliability.
- Support for Multi-Context Projects: Works across local development and production environments with minimal configuration.
- DDEV version 1.19+.
- PHP 7.4 or higher.
- Composer installed in your environment.
- CiviCRM integrated with a supported CMS (Drupal or Backdrop).
-
Download the Add-on:
ddev get vinugawade/ddev-civicrm-cli-tools
-
Restart Your DDEV Project:
ddev restart
-
Install Required Dependencies:
ddev composer require civicrm/cli-tools
-
Verify Installation: Run any CLI command to ensure proper setup:
ddev cv --version
The add-on exposes the following commands:
Execute the civistrings tool inside the web container.
- Alias:
cvstr - Examples:
ddev civistrings -o myfile.pot myfolder ddev civistrings --version
Execute the civix tool inside the web container.
- Alias:
cvx - Examples:
ddev civix build:zip ddev civix upgrade
Execute the coworker tool inside the web container.
- Alias:
cowkr - Examples:
ddev coworker list ddev coworker debug
Execute the cv tool inside the web container.
- Alias:
cv - Examples:
ddev cv flush ddev cv upgrade:db
.
├── LICENSE # License for the project.
├── README.md # Documentation for the add-on.
├── commands # Directory containing CLI command stubs.
│ └── web
│ ├── civistrings # Stub for civistrings command.
│ ├── civix # Stub for civix command.
│ ├── coworker # Stub for coworker command.
│ └── cv # Stub for cv command.
├── install.yaml # Configuration for DDEV add-on installation.
└── tests # Automated tests for the add-on.
├── test.bats # Main test file for the add-on.
└── testdata # Sample data for testing.
└── composer.json # Sample composer configuration.Contributions are welcome! To get started:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature
- Commit your changes:
git commit -m "Add your message here" - Push to your fork and submit a pull request.
The add-on includes automated tests written in BATS.
- Navigate to the add-on directory:
cd <ddev-civicrm-cli-tools add-on path>/tests
- Run the tests:
bats test.bats
👤 Vinay Gawade, Connect with me:
Special thanks to the CiviCRM and DDEV communities for their tools and support!